Why did Muslim leaders like the Ayatollah Khomeini oppose the Shah of Iran?

The Ayatollah Khomeini and other Muslim leaders opposed the Shah of Iran for his friendship with Western countries. They felt like he was selling out and the Muslim influence in the area would soon be replaced with Western teachings.