This only applies to shirt pulling. If the pulling starts outside the box and continues inside box then a penalty can be awarded but not for any other foul including handball. The first place where handball starts is where the kick should be taken from. In this instance a free kick outside the box