Los Angeles Superior Court Judge Elden S. Fox ordered the starlet to continue rehab until Jan. 3.
Lohan will not be returning to a suburban Los Angeles women's jail for a fourth time.
The hearing stemmed from a pair of DUI cases.
The "Mean Girls" star arrived at the courthouse about half an hour before the hearing, accompanied by her attorney and mother and flanked by deputies. She was dressed in jeans, a white T-shirt and a black jacket.
Friday's hearing was Lohan's fifth court appearance since May, when she ran into trouble with her probation on a three-year-old drug and drunken driving case.
In July and August, she spent 14 days in jail and 23 days in rehab as punishment for missing several court-ordered weekly counseling sessions.
The judge allowed her to be released from rehab early based on the recommendations of her doctors and laid out a path for her to be taken off probation by the end of the year.
Within weeks of her release from rehab, the 24-year-old failed a drug test. She acknowledged the result in postings on Twitter and said she was struggling with addiction.
The Associated Press contributed to this report.