The Messenger of Allah ﷺ said, "Islam is built upon five: the testimony that there is no god but Allah and that Muhammad is the Messenger of Allah, establishing the prayer, giving the zakat, the pilgrimage, and fasting Ramadan."
قال رسول ﷺ: بني الإسلام على خمس: شهادة أن لا إله إلا الله، وأن محمدا رسول الله، وإقام الصلاة، وإيتاء الزكاة، والحج، وصوم رمضان.
Bukhari related it in the Book of Faith (8), and Muslim in the Book of Faith (16/22), both from the hadith of Hanzala bin Abu Sufyan, who said, "I heard Ikrima bin Khalid, from Ibn Umar," and he mentioned the hadith, and the wording is Bukhari's.