SRD:Charm Animal

This charm makes an animal regard you as its trusted friend and ally (treat the target’s attitude as friendly). If the animal is currently being threatened or attacked by you or your allies, however, it receives a +5 bonus on its saving throw.

The spell does not enable you to control the charmed animal as if it were an automaton, but it perceives your words and actions in the most favorable way. You can try to give the subject orders, but you must win an opposed Charisma check to convince it to do anything it wouldn’t ordinarily do. (Retries are not allowed.) An affected animal never obeys suicidal or obviously harmful orders, but it might be convinced that something very dangerous is worth doing. Any act by you or your apparent allies that threatens the charmed animal breaks the spell. You must speak the animal's language to communicate your commands, or else be good at pantomiming.