A judge has told actor Shia LaBeouf that a disorderly conduct case against him will be dismissed and sealed if he avoids being arrested in the next six months.

A prosecutor told Manhattan Criminal Court Judge Ann Scherzer on Friday the Transformers star has completed a treatment programme following a his arrest last June at a Broadway show.

Shia LaBeouf in court for the hearing (Steven Hirsch/AP)
Shia LaBeouf in court for the hearing (Steven Hirsch/AP)

Authorities charged LaBeouf with a violation after he smoked cigarettes, yelled at actors on stage and cursed at security guards while watching a Cabaret revival.

Representatives for the 28-year-old actor have said he’s been treated for an alcohol problem.

LaBeouf said nothing to reporters as he climbed into a black SUV following his brief court appearance. Wearing a dark suit, he sported an eyebrow piercing and a braided rat tail hair style.