Penelope Soto, the teenager who flipped off a judge and was given a 30-day jail sentence, has been released from prison early after offering a tearful apology. Soto was sentenced a contempt of court charge after disrespecting Judge Jorge Rodriquez-Chomat on Feb. 4.

But after less than a week in prison, the teen apologized to the judge and admitted that she had been under the influence of drugs and alcohol during her hearing on Monday.

Soto will also have to complete a court drug program.

View the video of the teen's apology here:

Penelope Soto had appeared in the courtroom on Monday after being arrested for possession of drugs. However, after a bond was set for her release, the teen flipped her finger at the judge.

She had been rolling her eyes and playign with her hair during the hearing.

While standing in front of the judge in an orange jump suit, Soto told Judge Chomat that she earned $200 a week and her assets consisted only of jewelry and a vehicle.

When the judge questioned Soto as to what the jewelry was worth, she chuckled and said "a lot."

Taking notice that the teen's laughter didn't reflect wisely on the severity of the legal situation, the judge stated: "It's not a joke, you know, we're not in a club now. We are not in a club, be serious about it."

Soto responded: "I'm serious about it, you just made me laugh. You just made me laugh, I apologize. It's worth a lot of money."

Judge Rodriguez-Chomat asked Soto if she'd been on any drugs in the past 24 hours, which she denied.

Initially, the judge had set the teenager's bond at $5,000 and said "bye, bye," but Soto then laughed once again and said "Adios."

The judge then asked for Soto's papers back and reset her bond at $10,000, to which she replied "Are you serious?" When she turned around to walk away, she then flipped the judge off and said "F*** you."

The surprised judge brought her back in front of him yet again and issued her the 30-day jail sentence.

Soto was in court for possession of Xanax, which is an anti-anxiety drug only available through prescription, but is commonly used by people to get high.

View the video of Soto flipping off the judge here: