Rock star Courtney Love has been sentenced to six months in a live-in rehabilitation centre for using drugs while on probation.
Love's lawyer Howard Weitzman said she would be "clean and sober"
The judge did not send her to jail for the 180-day sentence because he said she was already making progress.
The former Hole singer and Kurt Cobain's widow has been living at the rehabilitation centre for a month.
Los Angeles Superior Court Judge Rand Rubin praised her for making an "excellent first step" to recovery.
Love, 41, is on probation for previous drug offences and attacking a woman with a whisky bottle.
She entered the clinic last month after admitting she had violated her probation by using an unidentified substance.
"I'm very pleased with your progress," Judge Rubin said on Friday. "I think this is an excellent first step on the road to recovery."
She will not be allowed to leave the clinic except in emergencies and will be subject to random drug tests. The judge also extended her probation until March 2007.
"Thank you very much, your honour," the singer said.
'Clean and sober'
Her lawyer Howard Weitzman said she "fully intends to make good on her promise to be clean and sober, and I'm hoping she'll be able to do that".
In a separate development on Friday, Love was sued by the woman she hit with a whisky bottle and a large lit candle last April.
The incident happened after Love found musician Kristin King in her boyfriend's home, and the singer pleaded no contest to assault in February.
Ms King is now seeking unspecified damages for assault, battery, false imprisonment and other claims.