Just as the District Attorney had confirmed over the weekend, under the terms of the plea, Hilton, 29, was placed on probation for a year. If she is arrested in the next year she will face a year behind bars.
Clark County Detention Center Justice of the Peace Joe Bonaventure, told Hilton, "The purpose here is to change your conduct. [The Clark County Detention Center] is not the Waldorf=Astoria."
Hilton was arrested shortly before midnight on Las Vegas Boulevard after police pulled over a vehicle in which she was a passenger. The male driver of the car was arrested on DUI drug charges. Hilton's purse also contained a bag with .8 grams of cocaine.
Arriving in the courtroom shortly before the judge, and wearing a white blouse and black pencil skirt, Hilton sat in the front row, looking solemn and speaking on briefly to her attorney, David Chesnoff.
After the hearing, the attorney told reporters: "She was treated like anyone else would be treated under the circumstances, and I'm very proud of the way she's dealt with this. I think she's on the road to success and I wish her personally the best."
Hilton must also complete a substance-abuse program, pay a $2,000 fine and complete 200 hours of community service. According to Chesnoff, "She does a lot of stuff with animal rights, and I understand she's done work with children's hospitals, so I think she'll continue something along those lines."
"Defendant shall stay out of trouble. Defendant agrees that an arrest for any charge, excluding minor traffic violations for which a citation is issued, shall result in the immediate termination of her probation and the execution of the suspended sentences," reads the deal.
Telling the judge multiple times that she understood and agreed to the plea bargain, Hilton admitted that she lied to Las Vegas police officers when she told them the purse that contained the cocaine wasn't hers.
As to why she misled authorities, a source close to Hilton tells PEOPLE, "At the moment it all came down, she was scared. But since then, she's had time to think about her actions, and she's taking this really seriously."
Asked why the heiress did not fight the charges against her, attorney Chesnoff said, "Miss Hilton accepted responsibility."
With additional reporting by CYNTHIA WANG