Britney Spears is going to guest star on Jane the Virgin, a TV show the singer says is her absolute favorite.

The pop star, whose grocery lists have been recently sold online, will play herself in the fifth episode of Season 2, notes US Magazine. "We are so thrilled that Rogelio's 'nemesis', Britney Spears, has agreed to appear [on the show]," confirmed creator Jennie Snyder Urman.

Mark Pedowitz, CW president, told reporters at TCA that knowing Jane the Virgin was one of Spears' favorite shows, he had to pursue a role for her.

"All I know at this point is, it's one of Britney's favorite shows. We understood that. Jennie and the studio went after Britney once they heard it was one of her favorite shows of all time," Pedowitz told reporters.

"To their credit, and to Britney's credit, she decided she'd come do it. I believe she's playing herself."

Previously, the pop singer starred on How I Met Your Mother and Will & Grace. She was also featured as the main role in the movie, Crossroads.

Jane The Virgin will return Oct. 12 on The CW.