Shell Trap is a decreased priority move. The user sets up a trap at the beginning of the turn, then executes the move Shell Trap at -3 priority if it has been hit by an opponent's physical move this turn. If the user has not been hit by an opponent's physical move at the time it would execute Shell Trap, Shell Trap fails. If the user is affected by Powder, Powder will trigger when the user of Shell Trap is hit by a physical attack.
The user being hit by an ally's move or its substitute being hit is not sufficient to allow the move to be used successfully.