A fortune cookie is a food that appears in and serve as a major plot point of the episode "Lame and Fortune."
They are a type of tan-yellow cookie usually associated with Chinese restaurants. They contain notes inside of them that tell a different type of fortune. In the case of the ones in "Lame and Fortune," their fortunes are always true.
Role in episode
Fortune cookies are first seen after a shipment of them falls from a cargo ship. The crate of fortune cookies land behind SpongeBob's house, where he and Gary begin to eat them. SpongeBob notices that his and Gary's fortunes came true, and he decides to share them with everyone else.
SpongeBob then decides to hand out free fortune cookies to customers of the Krusty Krab, but Mr. Krabs objects, not wanting to give anything away for free. However, he changes his mind once he notices the fortune cookies' fortunes are coming true. Mr. Krabs then has SpongeBob hand out fortune cookies to the customers where all of their fortunes come true.
Plankton observes the fortune cookies and decides to make some himself that force the customers to eat at the Chum Bucket. He then gives Mr. Krabs a fortune that he must give him the Krabby Pattysecret formula or else he will die. However, Plankton's plan eventually fails and Mr. Krabs gives him a fortune cookie that takes him to a restaurant called Chinese Food, where Plankton is eaten.