Shia LaBeouf just admitted guilt in is disorderly conduct case ... when he went crazy inside a NYC nightclub.
Shia pled guilty to disorderly conduct. The judge ordered him to complete 6 months of outpatient alcohol rehab -- he's already completed 3 months.
The judge also said he has to obey all laws for the next 6 months.
If Shia's a good boy and does what he's supposed to ... the case will be erased from his record.
You'll recall ... Shia was booted from Studio 54 in June after drunkenly confronting people during a performance of "Cabaret," then getting into it with cops outside the club ... allegedly spitting at cops and screaming, "Do you know who the f*** I am?"