A mother who was violently separated from her toddler by New York police in a widely viewed videotaped encounter agreed on Wednesday to do community service to resolve a separate legal case.A judge told Jazmine Headley, 23, that the charges will be dropped in her credit card fraud case in New Jersey if she successfully completes an intervention programme. Judge Peter Warshaw said Headley will have to pay back about $1000. Her agreement also includes 20 hours of community service."I'm just happy to be reunited with my son," Headley said outside the courthouse.Headley was released from a New York jail on Tuesday night after charges stemming from the incident at a benefits office were dropped. Brooklyn District Attorney Eric Gonzalez said he was "horrified by the violence depicted" in a bystander's video.The video captured the chaotic scene that unfolded last Friday as officers tried to remove Headley from the crowded office, where she had sat on the floor for two hours because of a lack of chairs. Police were called after a dispute with a security guard. She ended up lying face-up on the floor during a tug-of-war over her 18-month-old son."The baby was screaming for his life," Nyashia Ferguson, who posted video on Facebook under the name Monae Sinclair, told The New York Times. "The lady was begging for them to get off of her. I was scared."Other clients shouted at the officers. At one point, an officer can be seen pulling her stun gun and pointing it at people in the angry crowd.The incident is being reviewed by the New York Police Department and the Department of Social Services. Two city employees have been placed on modified duty.Officials criticised police for not de-escalating the situation; clients of the facility complained it is indicative of how the city treats social-services recipients. A police union representative said people should not rush to condemn officers, adding that the incident would have unfolded differently if those involved had complied with orders."Being poor is not a crime," said Democrat Letitia James, the city's public advocate and the state's attorney general-elect. "No mother should have to experience the trauma and humiliation we all witnessed in this video."