Sahih Muslim Book 008, Hadith Number 3241.

Chapter: He who sees a woman and his heart is affected, should come to his wife, and should have intercourse with her.

Jabir b. 'Abdullah reported that Allah's Apostle (May peace be upon him) saw a woman; and the rest of the hadith was narrated but (with this exception) that he said he came to his wife Zainab, who was tanning a (piece of) leather, and he made no mention of: "She retires in the shape of satan."