When the Simpson family is at the 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 by Chief Wiggum, who arrests Bart. Bart tries to bribe Chief Wiggum with the wedding presents, but Chief Wiggum only accepts cash bribes, as stated on his badge. Bart is sentenced to six months of juvenile detention by the 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". When 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. Bart 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. Then she gives him a goodbye kiss. Then they are freed, but after it happens, Gina is alone and forlorn. Gina yells at Bart and he calls her a psycho.
They engage in a brutal fight and this time, Bart is so angry he actually wants to kill her as much as she wants to kill him. The police come and arrest them, telling the Simpsons that now Bart will be in Juvie even longer. Gina, feeling terrible, confesses 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.