(CBS) Lindsay Lohan accepted a plea deal on Monday in a misdemeanor car crash case that includes 90 days in a rehabilitation facility.
The actress, who has struggled for years with legal problems, pleaded no contest to reckless driving, lying to police and obstructing officers who were investigating the accident involving the actress in June.
A judge said Lohan will be sentenced to 90 days in rehab, 30 days of community labor and 18 months of psychological therapy.
Before the "Mean Girls" actress left the courtroom, Superior Judge Superior Court Judge James R. Dabney offered her a suggestion.
"Don't drive," he said.
Lohan was on probation when her sports car crashed on Pacific Coast Highway while on her way to a film shoot.
The 26-year-old actress has been repeatedly sentenced to jail since 2007 when she was twice arrested for driving under the influence.
A hearing had been set to begin at 8:30 a.m., and Lohan arrived after 9 a.m. Lohan entered the courtroom looking slightly frazzled in a cream-colored ensemble. On her way inside, Lohan was hit with glitter by someone outside court. Once inside, she was seated next to a bailiff.
Her lawyers and a prosecutor met with the judge in chambers for more than two hours before Lohan entered the plea.
Attorney Mark Jay Heller, who represents Lohan, left the chambers several times to confer with her in a courtroom hallway.
Lohan previously pleaded not guilty.
She could face up to 245 days in jail if a judge determines she violated her probation in a 2011 theft case.
Lohan reportedly missed her original Sunday night flight from New York to Los Angeles, instead traveling on a private plane provided by a Los Angeles-based energy drink company for which she has made promotional appearances.
"Thanks Mr. Pink for the private jet see you all in a few hours in LA," she tweeted early Monday.
Lohan has resolved her numerous court problems without ever going to trial. Instead she has faced judges who have sentenced her to rehab and counseling, which even her current attorney acknowledges have not completely helped the troubled actress.
Lohan entered Monday's hearing with a lawyer whose competence has been questioned by a judge, and another set of attorneys waiting in the wings to take over.
The former Disney star has been under some form of probation since 2007, and her court troubles have stifled a once-promising career.
Lohan's return to acting last year in the Lifetime movie "Liz & Dick" was widely panned by critics and viewers. Her upcoming film by Bret Easton Ellis, called "The Canyons," co-starring porn star James Deen, is yet to be released. She will also make a guest appearance on Charlie Sheen's "Anger Management."
© 2013 CBS Interactive Inc. All Rights Reserved. This material may not be published, broadcast, rewritten, or redistributed. The Associated Press contributed to this report.