When Homer forces the kids to take classes in a strict rec center art class, Lisa meets an intelligent girl named Juliet Hobbes, who also likes Josh Groban. The two create a fantasy world that takes them away from reality. They deem the land "Equalia" where they are the queens and everybody is equal. However, Lisa soon becomes distracted in school after becoming obsessed with the imaginary land. After meeting Juliet's family and seeing her disruptive behavior, Marge thinks Lisa's friend might be troubled, and after she becomes obsessed in their dreamworld, Marge attempts to stop her from seeing Juliet, much against Marge's original idea of trying to get Lisa a best friend.
The next day, Lisa is invited by Juliet to run away to a run-down restaurant where they intend to live while they complete their writing. Lisa misses her Model UN meeting, where she was going to represent Azerbaijan. Martin contacts Marge and tells her about Lisa's disappearance. Marge immediately goes looking for Lisa, but cannot find her. Jimbo, Dolph, and Kearney, who use the restaurant as their hideout, find and trap Lisa and Juliet. They tie them up, then (apparently having untied them off-screen) lock them in cages. Dolph and Jimbo leave, and the girls escape by distracting Kearney with stories about Equalia. Dolph and Jimbo try to destroy the girls' manuscripts, but Kearney now believes in the idea of Equalia and attacks them -- in his mind he becomes a dragon and overcomes them, but in reality Dolph and Jimbo are beating him up while he smiles dreamily and obliviously. Lisa and Juliet escape. Later, Lisa tells Juliet that she wants to continue living in the real world and forget about Equalia. Juliet feels disappointed that Lisa feels this way and decides to abandon the friendship, claiming that "the real world is for people who can't imagine anything better" (causing Lisa to conclude that Juliet is crazy).
Two months later, Lisa is back at home with a rejection slip from a publishing company to whom she had sent her Equalia manuscript. Homer is then prompted to make his own fantasy story, based on his experiences as a father, which goes no further than him re-imagining the family in forms more pleasing to him: Bart is a hot dog, Lisa is a starfish, Marge is a bottle of Duff Beer, and Maggie is a monster truck.