Britney Spears must undergo random drug and alcohol testing twice a week, according to court documents in her custody dispute with ex-husband Kevin Federline.
The September 17 ruling requires both parents to refrain from drinking and drug use in the presence of their two young sons and 12 hours before either cares for them. Only Spears was ordered to submit to testing.
In court documents, Superior Court Judge Scott M. Gordon said "Based on the evidence presented, the court finds that there is a habitual, frequent, and continuous use of controlled substances and alcohol" by Spears.
Messages left with attorneys for Spears and Federline were not immediately returned.
The judge also said Spears must meet for eight hours a week with a "parenting coach" who will observe and report to the court about her parenting skills.
Both parents are prohibited from making "derogatory remarks" about each other in their children's presence, and also from "using corporal punishment" to discipline them. Each must complete the court's "Parenting Without Conflict" class.
Britney Spears married Kevin Federline in October 2004. She filed for divorce last November, and the divorce became official July 30. The two have joint custody of their sons, two-year-old Sean Preston, and one-year-old Jayden James, but Federline is seeking a greater share of the custody.