Plumber given community service for putting people's lives at risk