A motorist forced a PCSO to jump out of the way when he drove on the pavement.
Matthew Lewis, then 18, was showing off to his passenger by doing handbrake turns in a car park before driving along Shenley Road.
St Albans Crown Court today heard Lewis drove with all four wheels on the pavement where the woman officer was walking at about 5pm on October 12, 2012.
The PCSO jumped out of the way, saving herself from "catastrophic injuries", said Judge Stephen Warner.
Lewis, now 20, of Welham Close, Borehamwood, was convicted yesterday of dangerous driving. The judge ordered that he spend the night in prison before returning for sentence today.
He told him: "You were showing off and gave her a fright. You deliberately disregarded her safety. The offence crosses the custody threshold. You have spent the night in custody, so now you now what it is like."
The judge said he was just persuaded that he could suspend the prison sentence. He passed a seven-month sentence suspended for 18 months.
Lewis must carry out 180 hours' unpaid work and abide by a four-month curfew from Friday to Sunday between 7pm and 6am.
He must spend 24 hours at an attendance centre. He was also banned from driving for two-and-a-half years and must take an extended retest before he gets his licence back.