Kim Richards has an opportunity to make her drunken meltdown arrest go away thanks to a pretty sweet plea deal from the prosecutor's office.
Richards -- through a lawyer from Robert Shapiro's office -- entered a not guilty plea Thursday to charges of public intoxication, resisting arrest and battery on a cop. The lawyer explained Richards is currently in rehab.
The prosecutor went on record with a plea deal offer for Richards ... three years probation, 30 days of community labor or 30 days county jail, 52 AA classes and payment of restitution to the victim.
Richards was also told to stay out of the Beverly Hills Hotel ... which, considering how some stars feel about the place, isn't the worst thing in the world.
Richards was arrested on April 16 after a drunken tirade at the Polo Lounge inside the Beverly Hills Hotel.
The arrest led to Richards checking into rehab ...