When the Simpson family is at Costington's department store, Bart uses the wedding gift registry as a prank to register himself and his bride, "Lotta Cooties", for wedding presents. Bart invites many people to his so-called "wedding" and plans to take all the unused gifts back for store credit. Many people who know him had fallen easily for it (even though it had his name on it), but he is stopped in his tracks and gets arrested by Chief Wiggum. Bart also tries to bribe Wiggum with the wedding presents, but Wiggum only accepts cash bribes, as stated on his badge. Because of his "wedding" prank, Bart is sentenced to six months of juvenile detention by Judge Constance Harm.
At the detention center, Bart is being bullied by Gina Vendetti among other girls (she threatens to make his puberty very boring while wielding a penknife) when he encounters Homer, who has taken the job of being a prison guard to protect him. Unfortunately, his shift ends until two weeks from that day. He has another problem when he is partnered with Gina for the "prom". While they are dancing, Gina thinks of a way she can escape, but due to the fact that they are handcuffed together, she automatically brings Bart along since he has been convinced to go along since she kissed him. They are on the lam and look for a blacksmith who can remove their cuffs. She gives him a goodbye kiss. Eventually, they are freed, but shortly after, Gina is alone and forlorn, where she yells at Bart and he calls her a psycho.
They engage in a brutal fight and Bart is so furious that he actually wants to kill her as much as she wants to kill him this time. However, just before they continue, the police arrive and arrest them, telling the rest of the Simpsons that Bart will now be in Juvie even longer. Gina, feeling terrible, confesses that she does not have a family when she returns to jail (also clearing Bart of all charges that would result in him remaining in prison), but when she arrives back at her cell, she finds the Simpsons waiting to have a family dinner with her.