The ShowBuzz brings you a sneak peek of the pop star's appearance on the show.
Spears will portray a wacky receptionist in love with Ted (Josh Radnor) in the episode. Unfortunately, Ted is in love with the receptionist's boss, a doctor played by "Scrubs" star Sarah Chalke.
During the show, the receptionist undergoes a transformation of sorts.
"Initially, she's wearing glasses and (is) a little mousey and, as she develops this crush, she gets a little foxier, tries to impress me," said Radnor.