Is this a genuine query? You're letting your boyfriend 'shock' your pet for wanting to be in your 'space' and now you're wondering why the dog is reacting to your boyfriend being in his space?
If you're not a fan of shock collars why are you letting this man 'threaten' your dog with one? Seriously, I were you I'd ditch AX and rebound with my poor dog. Certainly I would NEVER allow someone to shock my dog- particularly someone with no clue about dogs in general. Disaster waiting to happen.