A Shrewsbury farmer who admitted trying to kiss a 14-year-old girl who was on his land has avoided a jail sentence and been ordered to quit drinking.