A tearful Lohan made a brief statement in court before the judge handed down the lengthy sentence.
"I have to provide for myself. I have to work," the 24-year-old told Superior Court Judge Marsha Revel as she attempted to explain skipping the mandatory class. "I did everything that I was told to do and did the best I could do to balance jobs and showing up."
The "Mean Girls" star broke down in tears and used her attorney's shoulder to cry on after the sentencing. Lohan is expected to surrender on the morning of July 20 and will also be required to continue wearing an ankle alcohol monitoring bracelet until then.
Lohan, a native of Long Island, was also ordered to enter an in-patient rehab program after her release from jail.
Tuesday's ruling came during a hearing set for the actress after she missed a court date in May.