Garfield, Jon, Odie and Liz are having a nice day at the beach when Odie finds a mysterious bottle floating in the ocean. He brings it back to Jon and Garfield, who realize that it is a magic bottle with a genie inside and they get three wishes for freeing him.
They go home and look up genies. Jon finds out there are good and bad genies. Before he can figure out how to get rid of a bad genie, Garfield persuades him into opening the bottle. Jon opens the bottle and a genie named "Omar" appears, but instead of serving Jon, he has Jon serve him and grant him three wishes. If Jon doesn't comply, he'll be turned into a frog.
After granting his wishes for dancing girls and food, Omar wishes for Jon to serve him eternally, leaving Jon trapped in Omar's clutches. When Omar makes ridiculous demands, Jon refuses, which results in him being turned into a frog. Garfield and Odie go back upstairs to do more research and realize that the only way to get rid of Omar is to trick him into saying his name backwards and if Garfield does that, he gets a wish.
The two then go to Vito's store and have Vito retype his menu specifically for them as part of Garfield's plan. They go home and show Omar the menu, which he proceeds to read out loud. One of the items on the menu is called "Ramo", which is also his name backwards, causing him to be sucked back into the bottle. Garfield starts thinking about what he should wish for. At first, he considers fame and money, but seeing Jon as a frog, he wishes everything was back to before they found the bottle, thereby sending them back in time and restarting the events of the episode all over again.