I would never use an e-collar or shock collar on a small dog. No need.
Jackson has been trained to not leave out of an open door without the use of a shock collar perfectly fine. We use clicker training/positive reinforcement/relationship-based training.
Here is an example of Jackson staying with an open door:
https://www.youtube.com/watch?v=OKoxF4NNuf0
As far as offleash training, start with a thin long lead and practice recall over and over again.
Check out YouTube channel:
Zak George's Dog Training rEvolution - YouTube