Defence agent Andrew Ormiston said he was “deeply regretful of his conduct”, adding that he was “having a great deal of difficulty with alcohol and drug use” at the time.
Mr Ormiston added Williams was now in a “stable relationship with a new partner”.
Sheriff Morag McLaughlin ordered Williams, of Oldcroft Place, Aberdeen, to be supervised for two years, undertake the Caledonian domestice abuse programme and carry out 150 hours of unpaid work.
She also imposed a 30-week curfew and a 10-year non-harassment order.
This article originally appeared on the Evening Express website. For more information, read about our
new combined website.