After more than a month of treatment, Real Housewives of Beverly Hills star Kim Richards has checked out of rehab, Us Weekly can exclusively report. "Kim is doing well," a source says.

PHOTOS: Biggest RHOBH bombshells

During her short stay, Kim "tried to leave and she ended up coming back," another insider told Us on December 29, adding that the 47-year-old was "very defiant."

Because she was in treatment, Kim -- who recently split with Ken Blumenfeld -- was unable to tape The Real Housewives of Beverly Hills reunion special, airing later this year.

PHOTOS: Celebrity rehab centers

Kim's erratic behavior was a central theme of the show's second season: in one episode, costar Adrienne Maloof's plastic surgeon husband Dr. Paul Nassif informed Kim that she was taking too many prescription pills, resulting in slurred peach and a "sedated" demeanor.

VIDEO: Lisa VanderPump impersonates Kim Richards

Costar Brandi Glanville also accused the former child star of being "wasted out of her f-cking mind" during game night at Dana Wilkey's house.

"Kim's alcohol addiction along with other substance abuse problems has been obvious for quite some time," a close pal told Us December 6. "It's really good that she's finally getting help."

Get more Us! Follow us on Twitter, Friend us on Facebook, Subscribe to Us Weekly