Free actions happen whenever*.
*Unless they're attacks. Then you only get one a turn.
move: any instance of movement, whether it is done willingly or unwillingly. When a creature, an object, or an effect leaves a square to enter another, it is moving.
4e Rules Compendium, p.314 "Glossary"
For purposes of the feat, consider "your movement" to be "movement you control", so you can decide where it ends. So, any time you move and end two squares from an enemy, you can shift 1 square. (This was published in the first issue of Dragon and my errata is spotty at best, but I'm pretty sure this movement isn't intended to chain into itself.)
A shift is a move from square to square. When you use your move action to shift one square away, you can then take the Pack Master shift.
A shift is a move from square to square. Immediately after you end your shift from Nimble Footwork, you can take the Pack Master shift.
Remember the specific procedure of the Charge action:
Action: standard action. When a creature takes this action, it chooses a target. [... F]ollow these steps.
Move: The creature moves up to its speed toward the target. Each square of movement must bring the creature closer to the target, and the creature must end the move at least 2 squares away from its starting position.
Attack: The creature either makes a melee basic attack against the target or uses bull rush against it.
4e Rules Compendium, p.240 "Combat"
After you end the movement from your charge, and before you attack, you can take the Pack Master shift. Note that because it happens before the attack, this will let you successfully charge attack a target you stop 2 squares away from.
- Using your move action to stand up from prone is not a move from square to square. You cannot take the Pack Master shift.