Lindsay Lohan managed to dodge not one but two rehab facilities late last night, side-stepping court orders and swapping her legal representation like most people change socks.

But this time around, at least she was smart about it: Rockstar lawyer Shawn Holley is reportedly back in the fold.

As we told you yesterday, Linds bailed on the New York facility she'd initially agreed to because it didn't allow smoking, opting instead to fly to the opposite coast -- against court orders -- and check into Morningside Recovery in Newport Beach, Calif.

But even though her attorney on record, Mark Heller, told the judge she was safely enrolled at Morningside, in reality LiLo never even got out of the car and was later seen wandering around a Fry's electronics store.

This, of course, didn't sit well with prosecutors, who threatened to have her arrested if she wasn't in rehab by midnight Thursday. Lindsay then reportedly spent the day calling and emailing Holley -- her former attorney who put up with Linds far longer than anyone else would have -- and begging her to help. And for reasons unknown, Shawn actually agreed to do so.

The latest is that Lindsay checked into Betty Ford just before midnight, and that Holley is working with prosecutors to smooth things over.

In the meantime, Heller supposedly has no idea he's been punted.

“Right now, Lindsay is focused on getting better. She wanted the drama to end, and that is why she fired Mark Heller," a source told Radar Online. "She was literally telling Shawn she would sell a body party if she would take her on as a client again. Shawn agreed, and Lindsay appreciates everything she has done for her. When Shawn says jump, Lindsay will automatically do so."

Once the judge signs off on the deal, LiLo's 90-day timer will officially begin counting down. How long will she actually stay? Start your office pools.

More From StarCrush