Khalid Javid was ordered to carry out 250 hours of unpaid work.