She also agreed to serve a three-year probation term, and must enroll in an alcohol education program. She was also fined $2,048.
During the hearing, Los Angeles County Commissioner Steven Lubell admonished Richie, saying: "Someone could've gotten killed. You need to understand that driving under the influence is extremely dangerous."
Richie was given the option of serving her time in a paid city jail, which is seen as a cushier facility than a county jail. She was given no surrender date, but must complete her jail time before Sept. 28.
Richie, with her hair pulled back and wearing a loose-fitting black dress, showed up 10 minutes early for her 8:30 a.m. (PST) hearing, arm-in-arm with her boyfriend, Joel Madden, who was also dressed in all black.
Prosecutor Carolina Lugo said outside the courtroom that Richie's reported (and unconfirmed) pregnancy had nothing to do with the plea deal. "That was not discussed and we have no information about that."
More on Nicole
Arrested on Dec. 11 after being spotted driving the wrong way on an L.A. freeway, Richie failed a field sobriety test and admitted to police that she'd smoked marijuana and took Vicodin earlier that evening. She was en route from Madden's home at the time.
She was previously convicted of a DUI in June 2003.
Although California law states that repeat DUI offenders get minimum of three months in jail, the sentence is reduced to only four days if the person accepts a three-year probation term.