The controversial devices were banned in Wales under the Animal Welfare (Electronic Collars) (Wales) Regulations 2010, which came into force on March 24 last year.

Mr Pook, who bought the collar online six months before the ban came into force, admitted using the collar to stop his dog from jumping over a high wall.

Bridgend magistrates heard the dog was wearing the device when it was found roaming a beach in December 2010, and was known at a local kennels as “the dog with the shock collar”.

On top of the £2,000 fine, Mr Pook was ordered to pay £1,000 in costs.

Prosecutor David Prosser said: “This is the first prosecution under the regulations for this type of collar.

“It operates like an electric fence, and if the dog approaches the boundaries or tries to escape it sends a shock to the dog.

“He didn’t accept that it was illegal because it’s legal in England, but this is the law as far as Wales is concerned.”

The regulations make it an offence to use a collar designed to administer an electric shock on cats or dogs, punishable with up to 51 weeks imprisonment.

Chair of magistrates, Caroline Naysmith, said: “We accept that you attached the collar with good intentions and when you first did so it was not illegal.

“But you knew the law had changed and you continued to attach the collar anyway.”

An inspector for the RSPCA, Nic De Celis, said: “It’s gratifying to see that this new legislation really works and is making a difference to animal welfare in Wales.

“I hope this case sends a strong message to all animal owners in Wales that the courts will not tolerate the use of these barbaric devices.”