PLEASANTON -- A Danville woman who left her twin 11-week-old babies in a car while she returned purchases at Stoneridge mall will be barred from leaving her children unattended and must stay away from the Nordstrom store in Pleasanton.

Amanda Nejat, 46, also must take parenting classes as part of an agreement reached between prosecutors and defense attorneys.

In court Thursday in Pleasanton, Nejat changed her previous not guilty plea to no contest in front of Judge Jacob Blea in Alameda County Superior Court.

Nejat was charged with two misdemeanor counts of child endangerment after leaving the babies, a boy and a girl, in her SUV at Stoneridge mall Feb. 8.

The second count was dismissed as part of the plea, and Nejat can expunge the judgment from her record in two years if she adheres to the terms of the plea deal, said her attorney, Louis Goodman. The date the judgment would be dismissed would be June 23, 2014.

The plea also requires Nejat to give up her right to resist a police search of her home without a warrant.

"The district attorney felt it was important as part of the protection of the children to remove the step of acquiring a warrant, so they can check where her children might be," Goodman said. "It does not mean they will be checking on her at all hours, all the time."

Nejat also was ordered to pay a $1,000 fine and to take 26 parenting classes and 52 individual counseling appointments. Goodman said Nejat had already is enrolled in those classes. She did not comment.

According to police, a shopper leaving the Nordstrom at Stoneridge mall about 4 p.m. Feb. 8 heard baby cries coming from a Cadillac Escalade. The woman looked through the tinted glass and saw the babies in child seats.

The woman called mall security officers, who stood guard at the vehicle. When Nejat returned, she was told to wait for police. Nejat initially told officers she had gone into the mall to use the restroom, but security footage showed she had been in Nordstrom for at least 40 minutes. She later admitted she had been returning purchased items, according to police.

The infants did not suffer harm and were released to the custody of their father, police said. It also appeared that the windows of the Escalade were left slightly open.

Contact Rick Hurd at 925-945-4780. Follow him at Twitter.com/3rderh. Contact Sean Maher at 925-943-8013. Follow him at Twitter.com/oneseanmaher.