Apparently heading advice from comedian Roseanne Barr, who told the entertainment Web site TMZ last week that Spears "needs a mother," Lynne Spears flew to Los Angeles over the weekend to console her daughter.
The court granted Spears supervised visitations with her children, saying "the monitor shall terminate visitation immediately" if Spears acts in a manner endangering her children, People magazine is reporting.
The court ordered Spears to complete counseling sessions and submit to drug and alcohol testing twice a week.
Spears mother and younger sister flew to Los Angeles Friday evening.
Spears and her mother had a bitter relationship that began over a hostile exchange in June.
The two are apparently on better terms.