Watching the episode from home, the singer wrote: 'Watching Baby brings back so many memories! Feels like yesterday.'
The hugely anticipated episode starred the 28 year-old as herself. She appeared in fantasies for the McKinley High Glee club singers, who hallucinated about her while under anesthesic at a dentist's surgery.
When the show paid homage to Spears' stage performance at the 2001 MTV Video Music Awards, where she famously sported a huge snake around her shoulders, the star wrote on Twitter: 'I know how hard it is to dance with that snake! Nice job.'
After the hour-long episode, Spears thanked the show creators for allowing her to appear.
'I loved it!' she said. 'Thank you guys SO much for making this happen!'