Lisa finds out on the last day of school how unpopular she is when nobody cares enough to sign her yearbook, while Bart makes people feel grateful that he signs theirs. Meanwhile, Ned Flanders offers the Simpson family the use of his beach house in Little Pwagmattasquarmsettport over the summer, though Homer makes Ned work on his faulty septic tank before he agrees. Marge likes the idea and suggests that Bart should bring Milhouse and that Lisa should bring a friend too. However, Lisa has no friends to bring and decides to change her image as a result, deliberately leaving behind her un-stylish wardrobe. After reaching the beach house, Lisa lies to Marge that she forgot to pack, so they go shopping for new clothes. Lisa buys a new set of clothes that she believes will make her look "cool", and goes to look for some likeminded people her own age. Marge, now feeling left out, decides to focus her parenting on Maggie, who looks worried. Homer, in the meantime, buys a large firework to celebrate Independence Day, only for it to backfire due to a fast-burning fuse; he initially throws it in the fridge, but changes his mind when he remembers the beer inside and instead chucks it in the dishwasher, causing it to rupture a pipe.
When Lisa succeeds in making friends with a group of local children (in particular a girl named Erin), Bart becomes jealous and complains that they should be his friends. He tries to steal her new friends from her with a skateboarding display, but they find his effort pathetic and shun him, which Bart blames on Milhouse. Lisa is then spending more time with her new friends, to the point where they hold a beach party to celebrate the 4th of July. Bart then decides to take revenge by showing her friends the yearbook and all of Lisa's deeply nerdy real pastimes. As her new friends stare in shock at Lisa's nerdy hobbies, Lisa runs off in tears.
The next morning, Lisa is furious with Bart for exposing her true self. She is about to pour maple syrup in Bart's eyes when Marge tells them about a carnival happening later that evening. They all go, but Bart and Lisa continue to bicker and fight, right up to when they ride the bumper cars and Bart rams Lisa's car out of the arena. Feeling dejected, Lisa decides to leave, concluding that she was probably never meant to have friends, and Bart feels guilty for hurting Lisa. When Lisa returns to the beach house, she finds her friends in the act of seemingly vandalizing the Simpsons' car. Thinking it's some sort of cruel prank, she simply tells them to finish it and leave, but it's then revealed they were actually decorating the car with sea shells in her honor, at which point they tell her they don't care that she's smart because she's a good person and they learned stuff from her. Lisa is thrilled, but Homer shows up and screams in horror at how his car got messed up. Before leaving Bart presents Lisa with her yearbook, which now has wonderful messages from her new friends and even Milhouse. He reveals he felt guilty for hurting her, so he explained his behavior to her new friends and asked them to sign her yearbook. Lisa forgives Bart, while Marge tells Homer that the kids should've cleaned out the shells before gluing them to the car, as the Simpsons are followed by seagulls trying to eat the mollusks inside.