A Los Angeles court commissioner has granted the singer three monitored visits a week with her two children.
The ruling requires Spears to childproof her house and work out a schedule for the visits with her ex-husband Kevin Federline. Her kids must be in car seats when they are being driven. And Spears must also continue meeting with a court-appointed parenting coach
Superior Court Commissioner Scott Gordon also required that Spears undergo random weekly drug and alcohol tests. He previously said there was evidence that she is a "habitual, frequent and continuous" user of drugs and alcohol.
The ruling came after a three-hour hearing Friday attended by both Spears and Federline.
Gordon had withdrawn approval for Spears to even visit the children after finding she had failed to comply with some conditions for shared custody. He later withdrew the ban and allowed her to visit her sons but only in the presence of a court-approved monitor.