No, it is one of the most inhuman things to do. You should never use a shock collar when your dog starts digging. Alternatively, you can put some block under the ground that is hard enough to keep your dog from digging.