I'd hardly an expert on Iran, but it seemed to be that the disputes between the religious conservatives and the Shah didn't blow up until well into the late 1970s. The discontent was real, as evidenced by the fact that Iran erupted like a dry forest in a lightning storm. If you can placate that earlier, then you may be able to allow the Shah to hang on long enough to allow a semi-smooth transfer of power to Farah and then Reza. The Shah's authoritarian tendencies, particularly in his later years on the throne, added to the problems.
First task is to get the population behind him. This means paying more attention to Iran's identity and reducing the level of both corruption and the suppression of leftist elements. It seems somewhat counterproductive to lay off of groups like the People's Mujehadin, but if they had gotten a handle on the strength of Khomeini and the religious conservatives earlier on it could have slowed down their growth in power if not stopped it altogether. The other problem is the economic reform programs of the early 1970s were too ambitious, and caused problems with inflation and shortages. Getting the population behind the monarchy to a greater extent would knock down most of these problems.
Ironically, what might help is a bit of chaos in 1980 after the Shah's death, and Saddam being his usual thuggish self. If he invades as OTL just as Farah and Reza are consolidating power, the nationalism Iran has would have worked in their favor, and having not purged the officer corps and tossed out the western military support staff as IOTL, the Iranians could have handed Saddam a beating and allowed the Monarchy to use such actions as proof that they are working for Iran's betters. Farah was a better person in general than the Shah was, or so it seems to me, and if she can show enough leadership during such a situation it would, I think, pave the way for her to rise onto the throne. Saddam helping the Iranian monarchy might be a bit of an oddball move, but I think that might be a really good way of going about it. Farah rises to the throne, Reza is crowned in early 1982 and both of them use their own personal feelings and the realities of the day to advance Iran's society and economy, in the former working to a mix of both the country's Shi'a religious beliefs, Reza's personal view of a secular state but with religion playing a major moral influence and Farah's advancement of equal rights for women. Considering the Soviets in Afghanistan and Saddam's usual trouble-causing self, this Iran could continue getting the backing of the West, and if political reforms establish greater democracy in Iran, than this works to Iran's benefit in a number of ways. Saddam turning to Soviets while Iran and Saudi advance their economies in the 1980s could well end up backfiring badly on Saddam.
For best results based on my research and knowledge, start in 1971 at the 2500th Anniversary of the founding of the Persian Empire. IOTL, this lavish celebration was only attended by foreign dignitaries. Bad idea. Better plan is that the Shah still does this but at the same time sends out hundreds of millions of dollars in aid to the people in Iran that were starving, and loudly proclaiming that this anniversary would be the beginning of a new country. The economic improvement program goes on, but the 1974 plans are scaled back as a result of falling oil prices in the 1970s, and efforts to hammer down corruption and waste bear fruit. Early problems with gaps between rich and poor are brought down through programs to increase the living standards of middle class and poor Iranians. This means that the problems of inflation and waste have much less effect. At the same time, the Shah sees the need to improve his support base among Iran's people. The Rastakhiz is never created, and people like Mehdi Bazargan, Abolhassan Banisadr and Ali Shariati move into the government. Aware that his legacy depends on his country not falling to the religious hardliners, he keeps Khomeini out of influence by trying to go around him using others who will work with him and improving his own support base. The armed forces' expansion plans are toned down considerably to put priority to economic concerns, and muzzling SAVAK is a must in order to not give Khomeini and his supporters ammo to attack the Shah for the brutality of his security services.
In 1978, he publicly discloses his serious illness from cancer and states that he is trying to ensure that Iranians are prosperous well into the future. This has the potential problem of backfiring though guys like Khomeini being emboldened, but having a major growth in support from the country's middle classes and having men like Bazargan, Banisadr and Shariati to help guide the integration of Islamic values into the country's more-liberal government, he can blunt Khomeini's power. The Shah asking Hussein to boot Saddam proved to be counterproductive, and I believe personally that if the Shah and his changing government can grow enough supporters to keep some semblance of control then the best thing to do about Khomeini is respect him as a religious figure but ignore him as a political one. This requires a power base, but the above actions could grow one.
Following the Shah's death in 1980, Farah takes over on an original interim basis. If she can get the various factions of Iran's opposition that use legal methods to work together, than she can both push plans to help keep the nation moving, recognizing that her husband's actions in later years were in some cases a mistake. Assuming Carter still loses in 1980 (quite possible), then Reagan will probably see Iran as a useful bulwark against the Soviets to the north. Reza is crowned in early 1982, but Farah still stays a high-ranking and influential person.