A former history teacher in Texas who admitted smoking pot and having sex with a 15-year-old student last year broke down in court as she was sentenced to eight years in prison.

Michelle Schiffer, 24, got emotional on Thursday as a judge handed down her sentence after she pleaded guilty in May to having an improper relationship with a child — admitting she had sex with the teen at least twice last summer, the Houston Chronicle reports.

Schiffer, who formerly taught at Cypress Springs High School, was led out of the courtroom in handcuffs. She had faced up to 20 years in prison after getting arrested in November, months after she met the student at a Chick-fil-A restaurant in Cypress before going to a friend’s apartment to have sex.

On another occasion, Schiffer picked up the student at a park, where they smoked pot before having sex in her car, KHOU reports. An anonymous student later reported the improper trysts to the school’s principal.

Schiffer’s attorney, Grant Scheiner, said the former teacher “accepts responsibility” for her actions, despite being disappointed with the outcome of her case.

“Michelle is prepared to serve her sentence and hopes the complainant and his family can forgive her,” Scheiner said.

Scheiner tried to convince a judge during a hearing last month that Schiffer should receive probation. It’s unclear when she could be released since the offense doesn’t require her to serve at least half of the sentence, according to the Chronicle.

“She has a scarlet letter that’s going to last the rest of her life,” Scheiner said. “And that is part of the punishment.”

Schiffer’s friends and relatives also said she suffers from depression during last month’s hearing. She stopped taking her medication prior to meeting up with the teen to smoke marijuana and have sex. But prosecutors said she was also sending text messages to other students, as well as sending them topless photos.

“This isn’t a heat-of-the-moment thing,” prosecutor Keaton Forcht said last month. “This is over a series of months with different students.”

Schiffer was removed from the school’s campus and put on administrative leave after she was charged with an improper relationship between educator and student, and sexual assault of a child. But she won’t have to register as a sex offender since she wasn’t convicted of sexual assault, the Chronicle reports.