Los Angeles Superior Court Judge Elden S. Fox ordered the "Mean Girls" star to undergo psychotherapy and addiction counseling sessions several times a week until November. He also ordered the 24-year-old to submit to random drug and alcohol testing at least twice a week and to continue living in the Los Angeles area.
He said Lohan could be sent back to jail for up to 30 days if she doesn't comply or if she fails the drug and alcohol screenings.
Lohan Out of Rehab, Early
Lindsay Lohan Shocker: Not an Addict, After All?
Lohan Trying to Revamp Her Image
Lohan Released From Jail, Goes To Rehab
Pictures: Jail Time for Lindsay Lohan
Pictures: Lindsay Lohan
Celebrity website TMZ.com says the bill for Lohan's stay in the UCLA Neuropsychiatric Hospital came to $130,400, and it's not covered by her insurance.
TMZ says Lohan was allowed to leave after doctors said that Lohan doesn't have the kind of problems a lot of people think she does and didn't need 90 days in the rehab center.
Earlier, TMZ said a dependence on the prescription drug Adderall, which TMZ called "the result of a medical misdiagnosis," may have been behind the Lohan's behavior that led to the conclusion she was an addict.
Lohan's estranged father, Michael Lohan, says he's happy she may have kicked one of her habits, but thinks she still needs long term treatment, reports CBS News Correspondent Ben Tracy.
"It's his understanding that Lindsay has gotten off the prescription drugs. That was his No. 1 concern, so he's OK with her being released," Michael Lohan's lawyer and CBS News legal analyst Lisa Bloom said.
Fox laid out the terms of the actress' early release from an inpatient rehab center during a 10 minute hearing, which Lohan did not attend. The judge said he ordered the actress' release at 5 p.m. Tuesday.
Another judge had ordered Lohan to spend 90 days in rehab after a 14-day jail stay for violating probation in a 2007 drug and drunken driving case. Lohan was at Ronald Reagan UCLA Medical Center just 23 days, however.
Fox gave Lohan some incentives and rewards Wednesday. He dismissed two drug counts that the actress pleaded guilty to in 2007. He also said Lohan will be taken off supervised probation in November if she complies with his orders, passes all drug and alcohol tests and does not miss any of her counseling sessions.
Fox took over Lohan's case after another judge, Marsha Revel, recused herself. A prosecutor had complained Revel met with defense attorneys and called rehabilitation programs without notifying her.
Revel sent Lohan to jail in July after ruling the actress violated her probation by missing seven alcohol education classes since December.
Fox said he based his modifications on the recommendations of Lohan's doctors and after reviewing three years of filings and medical records in the case.
Prosecutors did not oppose any of the conditions Fox placed on the star.
Lohan's attorney, Shawn Chapman Holley, said the actress is eager to prove that she can comply with Fox's orders.
"She has changed," Holley said. "She's healthy. She's clear-headed. She is positive at looking forward."
Holley said Lohan would not attend a screening of her latest film project, "Machete," that is scheduled for Wednesday evening. But she said Lohan's treatment schedule will permit the actress to resume working.
"This was a good day for her in court," Holley said. "She has complied with everything that has been asked of her."
Dr. David Sack, CEO of Promises Treatment Centers, told CBS News, "What's important in drug and alcohol treatment isn't necessarily how long they stay in treatment, in a residential setting, but that they continue their treatment with a full commitment after they leave."
Besides acting, Lohan has a fashion line of designer leggings and other clothing. She also has committed to starring as Linda Lovelace in a biopic on the porn star. The director of that film has expressed support and said the project will wait for Lohan.
Lohan's case is due back in court Nov. 1.
By AP Entertainment Writer Anthony McCartney. Associated Press video journalist John Mone contributed to this report