The three-year-old boy suffered puncture wounds to his front and back and needed hospital treatment after the attack at a pub at Fenny Bridges, near Honiton last September.
The nine-month-old Malinois puppy called Beau is now living under a suspended death sentence and will have to be kept under tight control and muzzled in the future.
Owner Phillip Maynard, aged 41, of Rosewood Drive, Crawley, admitted being the owner of a dog which was dangerously out of control and caused injury.
Exeter magistrates sentenced him to a 12 month long community order with 100 hours unpaid work and ordered to pay £680 costs, including £500 compensation to the injured child.
They made a contingent destruction order by the court which means he will be neutered, have behavioural training and only be allowed out in public on a muzzle and lead.
Prosecutor Miss Warjinder Bains said there was a fenced children's playpark in the garden but as the boy walked by the park the dog lunged for him.
The dog bit the boy, shook him violently and pulled him backwards along the ground before the owner intervened and got Beau off the child.
The boy's mother told the court her son was now 'terrified of encountering dogs' and suffers nightmares and has scarring on his torso.
Mr Herc Ashworth, defending, said Beau had been tethered by a rope lead but the leather handle had ripped and broken as he lunged at the child.
He said:"This is a terrible case but it was a momentary loss of control. It was an isolated incident.”