It's the end of another school year at Springfield Elementary School. While Bart and Milhouse discuss their plans for the summer, Lisa is taking care of the distribution of yearbooks. However, even with her academic track record and accolades in the yearbook (she edited the whole thing after Mr. Estes died), she becomes very disappointed when nobody wants to sign her yearbook. Later that day, Flanders makes a deal with Homer to watch over his beach house in Little Pwagmattasquarmsettport while he serves jury duty. The Simpson family head out to the beach house, with Marge suggesting that Bart could bring Milhouse and Lisa bring a friend too (only that Lisa has no friends).
Seeing this as a chance for a new beginning, Lisa abandons her old, nerdy image, and tries to develop a new persona, including "forgetting" to bring a swimsuit (Homer also forgot to bring a swimsuit, although he "improvised" by wearing the welcome mat over his otherwise bare crotch, which is also implied to have gotten himself arrested when he flashed himself). She gets a cool new look at the beach, and finds some skateboarding friends: Erin, Dean, Rick and Ben. Trying her best to fit in, she humiliates Bart by telling her new friends that he is a nerd.
Because of their vacationing there during Independence Day week, Homer decides to buy illegal fireworks at the Li'l Valu-Mart to celebrate the holiday. Because of this, Homer, to cover up the fact that he is buying illegal fireworks, also buys some porno magazines, a box of condoms, panty shields, and one, eventually two disposable enemas. After making sure everyone else was out of the store, the clerk then directs him to a secret closet containing lots of fireworks, and Homer buys the M-320 firework at his recommendation. Upon returning home, Marge, not realizing the other items he bought were a cover, told Homer to "count her out" of his plans for the evening. Homer and Bart later attempt to launch the M-320, but that was derailed when Bart does not have a lighter or even matches. Homer's disappointment ended quickly when he decides to light the fuse with the stove. Unfortunately, he burns off far too much of the wick, forcing him to play "hot potato" with the soon-to-detonate firework, eventually throwing it into the fridge, only to change his mind after realizing the beer was still inside, then grabbing it and then eventually throwing it in the dishwasher, and closes it and ducks just as it explodes. Homer sighs in relief, although the explosion severely damages the adjoining sink, resulting in it spewing up sewage and oil and flooding the floor with it. Homer then walks away whistling with his hands behind his back. Marge eventually had to clean up the mess as Bart was complaining about Lisa's newfound friends.
Bart becomes furiously jealous of the attention Lisa is getting (since she had lied about him and even stole some of his catchphrases), and attempts to ruin her friendships by showing them Lisa's accolades in her yearbook. Saddened at this event, Lisa runs off and Milhouse is furious with Bart's behavior.
The next day, Lisa confronts Bart for humiliating her. He tries to defend himself, but Lisa shows how angry she is with him. Milhouse comes to her defense and tells Bart about what happened that made her depressed about her own classmate with the exception for Ralph not liking her. He begins to feel guilty, but is also upset that Erin and the others think he's selfish and shallow towards others. Despite Milhouse's attempt to calm a furious Lisa down, she is about to pour syrup in Bart's eyes, when Marge comes in and tells them about a carnival. The family attends a carnival, where Bart and Lisa continue to fight over the previous night's events. Finally having had enough of her brother's torment, Lisa dejectedly walks back to the beach house and Bart feels guilty for his behavior. This isn't helped by Milhouse insisting that he does something nice for Lisa or he will tell on Bart to Marge and let him deal with the consequences. Once she arrives, she discovers her friends have decorated the family car with seashells. When Lisa asks why they would do such a thing for her, they let her know that her yearbook reputation doesn't matter. To them, she's still a great person. Homer walks out and sees the new decorations on his car, and exclaims "Sweet merciful crap! My car!" out of shock, horror and fury at the new decorations.
As the family leaves the next day in their car, with various seabirds also attacking the car due to the presence of shells, Bart returns Lisa's yearbook. He reveals to her that before they left he showed it to her new friends, who all signed little messages inside. Lisa smiles and thanks Bart for the kind gesture, as the Simpsons head home. Marge berates Homer for his actions and insisted that he'd gone to the car wash and cleaned off the shells before they left.