The Simpsons make their way to the Springfield Mall, a decrepit place filled with boarded-up storefronts, candle kiosks, and Persian CD stores. While Bart plays an outdated videogame in an arcade, Marge ends up in a close-out bookstore. Homer joins Marge in the bookstore, where he finds a collection of books called The Time-Life Carpenter’s Library. Marge loves the idea of Homer as a handyman, so Homer buys the book. When the family returns home, Marge opens a letter from Springfield Elementary. It’s a warning that someone at the school suffers from a peanut allergy. As a result, no peanut products will be allowed on school property. Marge finds Homer watching a NASCAR race on television, his feet propped up on the carpentry books. As Marge makes her way to the bedroom, she accidentally breaks a leg on the nightstand. Using the carpentry books, she successfully makes a repair. Filled with a sense of accomplishment, Marge sets about making a birdfeeder, a mailbox, and a doghouse. Lisa suggests that Marge put her skills to good use, and before long Marge starts her own carpentry business. Superintendent Chalmers hires Marge’s business to fix a bookcase. When Chalmers discovers that the repair is being done by a woman, he loses confidence in her and decides to hire someone else. As Marge loses more business, she comes up with a plan: Homer will act as a front and pretend to do the work. That way customers are put at ease, and Marge can get the job done.

Marge sets about building a wooden gazebo for Kent Brockman, who is impressed with “Homer’s” work. At Springfield Elementary Groundskeeper Willie confiscates peanuts from the kids. At first the kids suspect that Milhouse is the one allergic to peanuts. Bart decides to do a little investigating by keeping an eye on Willie. Willie brings a bag of peanut contraband to Skinner’s office, where Skinner orders it destroyed. When Willie begins to eat some of the peanuts, Skinner tells him to be careful with the crumbs, which could cause Skinner’s throat to close. Bart overhears the conversation, and realizes that his nemesis is allergic to peanuts. He chuckles deviously. Marge barely contains her anger when some female shoppers patronize her as she picks up some building supplies, which they assume are for Homer. When Marge returns home, she tells Homer he’s taking too much credit for her work. Homer reminds Marge that giving him credit was her idea. At school Bart decides to capitalize on Skinner’s peanut allergy. He uses some trophies from a trophy case as bowling pins. Skinner discovers the outrage, and orders Bart to serve detention. Bart pulls out a wood stick with a peanut tied to the end. Skinner lets out a gasp. Before long Bart has complete control over Skinner, and humiliates him at every turn. Marge’s temper begins to flare when Lenny and Carl make fun of the idea of a woman carpenter. When Marge returns home, she tells Homer that it’s time for people to learn the truth. Homer tells Marge that Mayor Quimby hired her to fix the old Springfield roller coaster. Marge tells Homer he’ll have to fix it himself. Meanwhile Bart tosses cats and lit firecrackers into Skinner’s pants.

Homer addresses some construction workers about the roller coaster repair. It soon becomes apparent that Homer doesn’t have the slightest clue what he’s doing. Skinner experiences a dream about Mr. Peanut following him through the school. Skinner awakens from his nightmare, only to realize that Bart is at the foot of his bed with his peanut stick. Bart forces Skinner to eat some rotting trash out of a garbage can. Bart tells Skinner he must stand in Comic Book Guy’s store window, where he’s supposed to “breastfeed Bilbo Baggins.” Comic Book Guy remarks that Bart has found Skinner’s “kryptonite.” This makes Skinner think that Bart might have “kryptonite” of his own. Skinner breaks into Dr. Hibbert’s office, where he accesses Bart’s medical files. He discovers that Bart is allergic to shrimp. When Skinner next sees Bart, he torments the boy with some shrimp on a stick. Using their peanut and shrimp sticks as weapons, Skinner and Bart battle it out, not unlike a pair of Jedi knights. They end up inside a Thai food factory, where they dangle from a catwalk suspended above a giant vat of peanut shrimp. Bart lunges at Skinner, and the pair topple into the vat below, where their faces swell. A crowd of onlookers gather near the roller coaster, the Zoominator, for its unveiling. When a red curtain is pulled away, the crowd gasps, impressed with what they see. Then a butterfly lands on the roller coaster, causing it to sag and creak. To prove the roller coaster is safe, Homer hops on one of the cars. Realizing Homer will kill himself, Marge sets to work repairing a broken rail just before the car rushes by. When the ride ends, Homer thanks Marge… and informs the crowd that everything he repaired was actually repaired by her. Suddenly the entire roller coaster collapses. Homer ends up in the hospital, where Bart and Skinner are recovering from their allergy attacks.