Shia LaBeouf has pleaded guilty to being a general nuisance at a Broadway show in which he lit up cigarettes and yelled at the actors on-stage. LaBeouf's representatives said the former Transformers star had gotten treatment for an alcohol problem since his arrest in June and a judge agreed that if he stays in treatment for three months and out of trouble for six, the case would be dismissed.

Shia LaBeoufShia LaBeouf at the Berlin Film Festival in February

LaBeouf, 28, was watching Alan Cumming and Michelle Williams in a revival of Cabaret when he started lighting up cigarettes, swearing at security guards and shouting at the actors. He shouted "do you know who I am?" when escorted out, according to court papers.

He had faced charges including a misdemeanour trespassing offense and some non-criminal violations. Since the incident, Shia has been treated at the Hills Treatment Center in Los Angeles.

More: Shia LaBeouf: his 5 weirdest moments

More: Shia LaBeouf arrested after New York theatre incident

More: Finally, a real look at Shia LaBeouf's 'Fury'

The incident was one of several controversial incidents involving LaBeouf this year. In February, he walked out of a Berlin Film Festival news conference for his movie Nymphomaniac Volume I and later wore a paper bag with the words "I am not famous anymore" emblazoned across the front to a premiere. 

Of course, Shia is a laugh. We like Shia. And all will be forgotten if he's any good in David Ayer's Brad Pitt-starring World War II movie Fury. The movie, set for release on October 17, follows an army sergeant named Wardaddy who commands a Herman tank and her five-man crew on a deadly mission behind enemy lines. Outnumbered, Wardaddy and his team have their backs to the wall in an attempt to make a final push in the European Theatre.

Watch Shia LaBeouf in the 'Fury' trailer: