'The Playbook' - Season 5, Episode 8
After Barney hooks up with a woman Lily had intended for Ted, she gets revenge by stealing his "playbook".
Air Date: November 16th 2009.
("The My Penis Grants Wishes" from "The Playbook")
Girl: Really? A genie comes out of it?
Barney: Only if you rub it hard enough.