You don’t need to shoot the dog. A garden hose works fine.
I had a neighbor’s poodle cruise my yard every morning and do his bidness and snoop around my porch.
I fed it a piece of steak fat rolled in cayenne and pepper flakes. Poor bugger never came back after that.