There's more: Sarah wasn't fired from her work for wining and dining her students; the principal was putting the moves on her, and shuffled her off to keep it secret. Casey says she'll drop the charges against Sarah and tells the detectives to pick up Shane.
Fortunately, defense attorneys have a habit on this show of walking into a room just at the right time to offer their own opinions. This time it's Annie Potts, playing Sophie, saying it wasn't her client's fault, as he is a bona fide sex addict. Oh, god...[fast-forward, fast-forward].
Eventually, we make it to the judge's chambers, while Sophie goes on about the internet-porn-surfing and inveterate-hooker-fucking that Shane partakes in, and there's some stuff about neurons and what have you. Basically, all Casey's got is, "But he raped her!" and warning that if the judge allows this, every pedophile will be found innocent because their brains are wired wrong. And while the judge seems to believe that, she doesn't want to chance a guilty verdict being overturned on appeal.
Huang interviews Shane, who, among other things, says he masturbates five or six times a day. God, who even has that kind of time anymore? Huang runs tests, which are intercut with his testimony, which outlines how Shane's brain is actually wired differently than most people's (not that he's willing to completely hand the case to the defense by outright saying he thinks Shane deserves treatment rather than jail).
After Sophie questions Shane ridiculously briefly, Casey asks him about the photos of his lingerie-clad teacher, which turns out were found on his computer. He admits to Photoshopping them on his computer after the rape. Casey gets him to admit he knows rape is wrong, but not much else and she browbeats him into breaking down crying as he yells at Sarah (in the courtroom watching) that he's sorry.
Sarah taps Casey on the shoulder and says "I need you to do something for me: set up a meeting between Shane and me where he can promise to do whatever he can to get better so I can take pity and ask you to go easy on him." Then, this is what happens. "I can live with the pain, but I can't live with ruining Shane's life if he can be helped," she says. Casey offers 18 months probation in a detention centre for juvenile sex offenders, with treatment, and if he successfully completes treatment, the rape charge will be dropped, and his record will be cleared. "You screw up, though, and you're doing the full monty: seven years for the rape," she says. He accepts, and regular viewers of the Law & Order franchise in all its incarnations instinctively check the clock, and groan when we see there's still fifteen minutes left in the episode.