A ferret won't link the action to the punishment. Therefore, punishing them will only make the ferret wary of you and make them think you behave irrationally.