Kim Richards had an ah-ha moment a few days ago ... she needed help, so she made the decision on her own to check into rehab.
Sources familiar with the situation tell TMZ, Kim is in a live-in facility in Malibu which specializes in substance abuse. We're told she made the decision after consulting with family.
As we reported ... the "Real Housewives of Beverly Hills" star was arrested 9 days ago at the Beverly Hills Hotel after allegedly causing a scene while heavily intoxicated. She was booked for trespass, resisting arrest, battery on a police officer, and public drunkenness.
We're told she will stay at the rehab facility "as long as it takes."