It's all to do with food, love and lots of training.
So says John Fraser whose dog Red was one of more than 200 dogs competing in the Wanganui Dog Training Club's championship agility show over the weekend.
The best doggy behaviour was on display as canines ducked and weaved their way through the various obstacles at Otamatea Reserve.
"Red's an SPCA special. SPCA dogs can do anything," Mr Fraser said. "He's a very nice dog and has got a pleasant nature."
Mr Fraser has been competing in agility events for 20 years.
"I do it for the fun and it keeps me fit," he said.
"I come here, book two nights' accommodation down by the river, eat out, spend money in this town. It's a good way to see the country."
This year's event attracted entrants from all over the North Island.
"This is probably our biggest event of the year. A lot of people come being summer time," Event manager Bill Stewart said.
"There's all breeds. All breeds, sizes, colours and its the same as the handlers - from kids to grandparents."
Mr Stewart said there was a lot people enjoyed about dog training and competitions.
"It's a bit like dog trialling - it's partnership with the dog. There's a lot of camaraderie too."
It took a lot of time and effort to get a dog to compete at a good level, he said.
"It's about having a really a good rapport with your dog, and the training. You have to put a lot of work into it.
"You do your basic obedience first so you've got them responding to commands. You need the basic control, so you can control them off-lead."
Dogs can compete in agility events after they turn 18 months old.
"It works mostly on positive reinforcement, they're rewarded when they do something right. That's what training is based on now."