How I Met Your Mother episode The Magician's Code - Part One
May 14, 2012
In a scene in the twenty-third episode of Season 7 (Episode #159), Marshall tries to use an automated teller machine while drunk. He starts seeing the elements of the screen moving around, and then the image changes to gameplay from The Legend of Zelda, precisely from the Eagle Labyrinth, the first dungeon in the game. It then also changes to a video of a chimpanzee doing karate.
The creators of How I Met Your Mother held no right over Nintendo's Zelda, but they only included a minor appearance of the game. Curiously, though, only the chimpanzee video was officially licensed, as shown in the end credits.