WITH FRIENDS LIKE THIS, who needs enemies. This is one question that the president of the United States and the late Shah of Iran could have asked himself about the other. It is certainly a question every American should raise about the last 39 years of U.S. relations with the shah.

During most of those nearly four decades the shah was taken for granted as one of America'a staunchest allies. But it was not always thus. In the early years of his reign, he turned to the United States primarily for assistance in evicting Russian troops from his turf, making Iran the first focus of a cold-war face down with the Soviet Union. And just before the shah was hurled from his throne by his disgusted countrymen, the U.S. government awoke from a long sleep to recognize him as Uncle Sam's ugliest and most unpopular orphaned nephew.

Who was this man? What were his relations with the United States? How and why was he so ignominiously dethroned? These are the questions to which each party -- the shah and the United States -- should provide an answer.

For the near future at least, President Carter has made it cleat there wll be none from the United States. In Answer to History the shah has not only provided his but already revised it once. After publishing this autobiography in French, the deposed ruler who was reportedly prevailed upon by his family to rework it into a second, tougher version for English audiences.

Fallen dictators cannot be expected to explain, justify or even confess their tyranny in autobiographies; but it is fair to expect them to deal with at least those events that are publicly perceived to define the treachery of their reign. To do otherwise is to defy credibility.

The shah, as usual, defies both expectations and credibility. Instead of providing the sophisticated apologetics of an intelligent senior statesman, he gives us a pathetically sniveling attack on the people encountered in his life, sparing only family members, the Rockefeller brothers, Nixon, Kissinger, and a handful of other court toadies.

For the aficionadors of the reign (they grow in number every day as Iran replaces Vietnam as the contemporary American foreign policy metaphor), Answer to History contains only a few skimpy tidbits. For example, after the many international entreaties to relinquish power, the shah says he was finally persuaded by former British foreign minister George Brown.

The book's greatest value lies in its glib answers, excuses, undocumented rumors, crude and inarticulate speculations, and litany of those who are blameworthy for all evil in Iran today. Here reside the few glimmers of insight for those who have known nothing about the shah. These unintended revelations illustrate his indecision, pettiness and practice of double-think. But such nuggets are few and far between, and the imperial arrogance of the once king of king's is totally absent.

In the shah's view everyone else is at fault. Portraying himself as the passive victim of myriad plots, he regularly steps back from events ("I found myself walking across the tarmac of Mexico City Airport") and variously blames "the international oil consortium, the British and American governments, the international media, reactionary religious circles in my own country . . . the relentless drive of the Communists . . . McGovernites in the second echelon of the State Department . . . student demonstrators . . . dogmatic young journalists . . . the West."

The British and the Americans are at several points either in league or synonymous with the Communist Party; yet both countries, and their intelligence agencies, are also in lockstep with the international oil consortium to ruin the shah. This is a pattern of sabotage that he dates in different places as beginning in 1957, 1958, 1959, 1962, 1973, 1975 and 1978. According to the shah, the British controlled elections to the parliament and destroyed the Irnaian economy. Former Prime Minister Mohammed Mossadegh is at the same time "a British agent" and the culprit who refuses to negotiate a deal acceptable to the British because he is too closely tied to the Soviets.

All of these things happen miraculously without the shah taking any responsibility -- and yet transpire as he replaces at least a dozen prime ministers.

In the face of widespread reports of Carter administration support for the peacock throne because of fears of a cmmunist takeover, how credible is the following analysis by the shah? "The United States, and indeed most Western countries, had adlpted a double standard for international morality: anything Marxist, no matter how bloody and base, is acceptable; the policies of a socialist, centrist, or right-wing government are not."

Similarly ironic and insightful is the man's willingness to blame the British and American governments for failing to preempt the arrival of Khomeini, while taking no responsibility for his own failure to accommodate the more moderate members of the opposition, who might have prevented the reign of terror that accompanied the arrival of an Islamic regime.

There is also a hint, but regrettably only a hint, of the confusing dynamic by which the shah puppet used to pull the strings of the American puppeteer.

The shah displays no trace of responsibility for nearly bankrupting Iran with his appetitie for military purchases. Instead he claims, "To my knowledge, no military leader of world stature has criticized my arms policy as excessive. As for robbing the Iranian people of their living essentials in order to pay for armaments, nothing could be further from the truth. After paying for these armaments, Iran had a reserve of $12 billion in foreign currency." The shah ignores the fact that there was a foreign currency reserve, whatever it totaled, only after he was pressured into canceling several billions in pending arms orders and dropping $30 billion more in future arms purchases.

Answer to History is too awful even to be laughable. It is also so poorly written that it is hard to believe that a copy editor ever touched the manuscript, much less that it was ghost-written by an English-speaking grammar-school graduate.

If the shah's answers are historically trivial and if President Ronald Reagan continues Carter's silence on the subject, where must one turn for insight? Until this month, the choices were limited to a half dozen or so historical texts completed in recent years, none with any account of the last year of the shah's reign, the completion of the revolution, the seizure of the hostages, and the negotiations for their return. One could, of course, wait two to 20 years for the release of the 60,000 pages of classified documents that President Carter has had secretly collected and then another dozen years until they are all absorbed and placed in perspective.

Fortunately, there is now a third alternative: Barry Rubin, a fellow at Georgetown University's Center for Strategic and International Studies, has provided an extremely readable, up-to-date, comprehensive and balanced study which is also a unique combination of scholarship and reporting.

On the one hand, Paved with Good Intentions provides new historical analysis based on a careful reconstruction of events in the early 1950s. Using information obtained under the Freedom of Information Act, Rubin supplements the work of such scholars of this early period as Richard Cottam and Bruce Kuniholm.

On the other hand, Rubin borrows techniques more characteristic of investigative reporting than history. Using new information from unidentified individuals intimately involved in the events, he is able to unravel contemporary developments (some as recent as last July) and reweave them in an often rich narrative style.

Paves with Good Intentions is not, however, without minor faults. When sources are not identified for readers, as is the case here, journalists often find it necessary to compensate, either by quoting frequently from documents -- which can eventually be checked -- or by detailing meetings and conversations precisely, providing dates, the names of participants, or other specifically verifiable items.

Still, the book makes no claims that the reader will not find argued effectively from the evidence cited. What little skepticism Rubin deserves comes on two minor premises implicit in his title.

The good itentions that paved Iran's road to hell could fit between all the world's angels as they danced tightly together on the head of the proverbial pin -- unless, of course, one views the exploitation of a country as well intended. Rubin seems to presuppose that what a government does is not only intended, but intended to be both rational and for its own benefit, as opposed to non-rational (not irrational) and for the benefit of some private interest. As a result, one occasionally has the feeling that he has allowed lower level State Department personnel to rationalize policy aberrations that more likely than not grew out of totally unrelated individual antagonisms at a much higher level.

Similarly, Rubin's title begs the question originally posed here: With friends like this, who needs enemies? Rubin comes to grips with the shah's relationship with the U.S., but he ignores the degree of popular support for the new revolution.

Khomeini's Islamic Republic is neither paradise for the Iranian people, nor the ever-lasting hell that the shah paints. But it is the product of a revolution in which virtually every sector of society took part. Many Iranians are disappointed now, but very few would tade the promise of their intended future for the bankruptcy of a past dominated by the shah or the United States. Better to pave one's own road to hell than travel on another's well intended highway.