The "Firework" singer will appear in the March 6 episode as Rikki, a prison attendant who claims to be a friend from Sabrina's (Shannon Woodward) past.
The episode marks Hope's new time slot as it shifts from 9:30 p.m. to open Fox's new comedy block at 8 p.m. during Glee's winter hiatus.
"Shannon Woodward told me that her friend Katy was interested in doing an episode and I thought, 'Why not? Let's do your friend Katy a favor,' " executive producer Garcia said in a statement announcing the casting. "Then she came in and did a terrific job. She was hilarious. And now people are telling me that Katy is also a singer. I sincerely hope that her appearance on the show helps her get her singing career off the ground. It's a tough business."
Added Perry: "Shannon Woodward is my best friend. A couple weeks ago, I was home, just toasting up a frozen chicken fillet when she called me up and asked if I wanted to do something 'fun' for a change and try out a guest role on her TV show. I thought, 'Sure, I have nothing else to do, and I like chillin' with my best friend.' Greg was nice, but I hope he's not secretly sabotaging my potential future career by type-casting me in the role of just a looker, so that I would never be able to play anything more challenging."
Perry's California Dreams tour wrapped after 124 performances and the special edition of Teenage Dream: The Complete Collection will bow March 26 and feature three new songs, including "Part of Me."