Islam teaches to spread love to the entire universe. Not only to fellow humans, but other creatures must also get the influence of affection from Islamic teachings including animals. Because Allah has created animal life in contact with human life, even facilitating human life.
Allah ta'ala has said,
"And he created livestock for you, there are (feathers) that warm and various benefits, and some of you eat. And you get beauty at it, when you bring it back to the cage and when you release it. And he transports your burdens to a country where you cannot reach them, except with difficulty. Really, your Rabb is truly Merciful and Merciful. And (He has created) horses, mules and donkeys for you to ride and as jewelry. God created what you did not know. "(An Nahl: 5-8)
In the history of Islam, the relationship between humans and animals is well established, for example the relationship between Ashabul Kahfi and their dog. Prophet Sulaiman with a troupe that he ordered to go to his hole so as not to step on the foot of the prophet Sulaiman. Similarly, the Messenger of Allah, when he moved to Medina he rode his camel called Al Qashwa`. There is also a friend whose name is Abdurrahman bin Shakhr. He likes to carry a small cat until the Prophet gives his beloved calling to him as Abu Hurairah, which means the cat's father.
Animals also feel pain and fatigue like humans. So Islam prohibits burdening and employing animals beyond their capabilities.
One day Rasulullah saw entered a garden belonging to Anshar's best friend. In the garden there was a camel, whose eyes suddenly wiped out when he saw the Messenger of Allah. Finally, he asked, "Who is the owner of this camel?" A young man came by saying, "I'm the Messenger of Allah." He also said, "Do you not fear Allah about this beast? Indeed he complained to me, that you let him be hungry and constantly forced him to work. "(Narrated by Abu Dawud)
Rasulullah saw also said:
"The one who does not love is not loved (by Allah)." (Narrated by Bukhari)
Killing even in a good way
Imam Qurthubi says that the promise of Allah swt in the form of forgiveness and the abundant reward that will be given to those who do good to the animals does not mean we can not kill them. We can kill animals if they will bring mashlahah. Examples of killing devastating and disturbing human beasts, destroying crops and eating livestock. The Prophet mentioned various kinds of animals:
"Five animals that are all evil, (may) be killed in unclean land, namely: crows, eagles, scorpions, rats, and dogs that like to hurt." (Narrated by Bukhari)
But killing him must be in a good way. May not be chopped or burned with fire. The Messenger of Allah said:
"You must not torture with fire except the Rabb who has fire (ie Allah)" (Narrated by Abu Dawud)
It is also permissible to slaughter halal animals to eat. But in the matter of slaughtering, the Prophet gave guidance as a form of affection for animals including sharpening knives. Because a blunt knife will be difficult to use so that the slaughtered animals are tortured because of it. The Prophet said:
"Verily, Allah commands to do good to all things. When you kill then fire in the killing and when slaughter it is good in slaughtering. Let one of you sharpen the knife and make it easy for his slaughter. "(Narrated by Muslim)
Including good to animals is not sharpening the knife we will use to slaughter before the beast, as it will hurt him. The Prophet had once reprimanded the people who did so by saying: "Why did you not hone this before? Do you want to kill him twice? "(Narrated by Thabrani and Baihaqi)