Smithers declares his love for Mr. Burns after he saves Burns' life in a skydiving accident, but Burns reaffirms his contempt for him. Angry, Smithers treats Homer, Lenny and Carl harshly, so they determine finding Smithers a boyfriend will ease the ill-treatment. They invite potential partners to meet Smithers at a gay men's singles' party, where a neck massage from Julio snaps Smithers out of his bad mood. The two fall in love, and Smithers leaves his job at the power plant.
Smithers becomes troubled on a trip to Julio's homeland of Cuba when Julio's carnival outfit resembles Burns; Julio notices and asks Smithers if he is committed to their relationship, and Smithers admits that he is not. Back in Springfield, Burns' attempts to find a new assistant prove disastrous, and his only option is to rehire Smithers. He meets Smithers with money and other enticements to lure him back, but Smithers states that he is not swayed. Burns then says he has kept a secret bottled up: that Smithers' performance review is "excellent". They hug and reconcile.
Meanwhile, Springfield Elementary put on a production of Casablanca, in which Lisa gets the lead role of Ilsa. Milhouse wants the male lead role of Rick because of his love for Lisa, but he is challenged by a new boy, Jack Deforest, who dresses, acts and speaks like Humphrey Bogart. Milhouse enlists the bullies to beat up Jack, but Jack wins the fight. Principal Skinner sees this violence and declares that Milhouse will play Rick instead of Jack; Lisa is angered as she does not believe that he is a good actor. Marge tells Lisa that it is important to encourage people who are not skilled by telling them that they are, using the example of Homer. The production is a success, but at the end it is revealed that Jack was disguised as Milhouse; he and Lisa leave hand-in-hand.
In an epilogue Milhouse goes to Moe's Tavern, where Smithers teaches him that romantic setbacks make love feel better when it arrives. Moe tells the pair that he only searches for gold, not girls, and embarks on a treasure-hunt with Jack and Groundskeeper Willie.