The surface of the earth and our body both are good conductors. Therefore, our body and the surface of the ground form an equipotential surface. And, the original equipotential surface of open air changes or modifies as we step out of the house, into the open. Hence, our body and the ground is kept at the same potential. Therefore, we do not get an electric shock.