A Wigan man has been ordered to do 80 hours of unpaid work after attacking a woman.