The Prophet said: "Stoning the Jimari and Sa'i between As-Safa and Al-Marwah are only done for the establishment of Allah's remembrance."
Jami` at-Tirmidhi Book 9, Hadith 95