House is in jail when we meet him on the season eight premiere. Right from the beginning of the episode, House is given 5 days to behave himself before he is let out early on parole for "goodish" behavior. We're given a look inside his daily routines and quickly find out that House is having to hand over some of his Vicodin to a skinhead ironically named Mendelson on a daily basis. Once Mendelson and his prison gang hear of House's parole, they up the anti and force House into giving them all of Vicodin, including the pills that he's already taken, hence the title of the episode, aptly named "Twenty Vicodin."
House also has a roommate who barely speaks and is twice House's size, all in the form of muscles and tattoos.
As if House wasn't under enough pressure, and now in more physical pain because he's taking less Vicodin, he stumbles upon a medical case that peaks his interest. A new prisoner has some symptoms that lead the prison doctor, Dr. Adams (Odette Annable) to believe he has an STD, but House of course, makes her realize she has something else. As House figures out the patient's ailments, Dr. Adams tries to understand why House is there and why all of a sudden, she's willing to bend the rules for a prisoner with a gift for diagnostic medicine. We find out House shouldn't have had to serve time, but took whatever was offered to him. Throughout the episode, House speaks of giving up medicine and pursuing physics, especially trying to solve the mystery of dark matter.
As both problems of House's problems come to a head, House refuses to fall in line, both with threats from a higher up doctor, and threats from Mendelson. He gives the patient a dangerous test to confirm his diagnosis and he throws his pills in the air for the rest of the prisoners to fight over, nearly getting himself killed in the process. In the end, it's his silent and musclesque cellmate who saves him from being stabbed by a fellow prisoner.
In the end, House is seen in solitary confinement, receiving a note, no doubt from Dr. Adams with three of House's favorite words: "You were right!"