A man who smashed the windows of a New Milton shop with a hammer has been ordered to cough up £3,000 compensation.