Lindsay Lohan Lindsay Lohan

Lindsay Lohan has been ordered to undergo psychotherapy and random drug testing following her release from inpatient rehab.

The 24-year-old actress will have to submit to random drug and alcohol testing twice a week, and attend four psychotherapy sessions a week. She will also have to attend 12-step chemical dependency sessions five times a week and go to two behavioral therapy sessions weekly.

 Check out photos of Lohan through the years

Any missed or dirty tests will result in a 30-day jail sentence, under the order of Judge Elden Fox, who presided over Wednesday's hearing. The new rules will apply through Nov. 1, the date of Lohan's next progress hearing.

"She is serious about her sobriety," Lohan's lawyer, Shawn Chapman Holley, told the judge, according to People. "She looks forward to proving to the court ... that she's moving forward in a positive manner."

Prosecutor: Lindsay Lohan could be released early from rehab

Lohan was released Tuesday from court-ordered rehab served after serving 22 days at an inpatient substance abuse program at UCLA Medical Center.

She was sentenced in July to 90 days behind bars and 90 days in rehab for violating probation from a 2007 DUI charge. She was released from the correctional facility after just 13 days because of overcrowding and good behavior and entered rehab immediately after.

A call to Lohan's attorney was not immediately returned.