Will it work, is it legal, and will it prevent dog bites? The answer to these questions is "sometimes."
Pet containment systems, generally
Dog bites and electronic pet containment systems
Electronic systems are not always legal
Manufacturers, distributors and sellers might be liable for some dog bite injuries