The Justice Department is investigating the activities of Robert F. Armao, spokesman for Iran's deposed shah Mohammad Reza Pahlavi, to determine if the 30-year-old New York public relations man is required to file under provisions of the Foreign Agents Registration Act, according to government sources.

Under the law, agents who do file must lay out in detail all their receipts from the foreign principal and each expenditure made on behalf of that client.

The current inquiry marks the second time Justice has investigated Armao's activities.

Last August, after Armao was quoted in The New York Times as saying he wanted to change the shah's image, Justice lawyers called him about registering, sources said.

These sources said Armao's lawyer responded by saying Armao was not hired for public relations work but to help manage the shah's daily activities and work on the shah's memoirs, which were to be published in France.

Justice dropped the matter at the time, sources said, since there was no indication -- outside of Armao's own words -- that any public relations work was being done on behalf of the shah in the United States.

Armao, who is in Cairo with the shah, last week told The Washington Post's Edward Cody that he had been hired in December 1978 by Princess Ashraf, the shah's sister.

He also told Cody his lawyer had been informed registration with Justice was not needed since neither Armao nor his firm, Armao & Co., were lobbying on behalf of the shah.

He added that if Justice asked him to, he would register.

Lobbying is not the only activity that requires registration under the act covering the activities of foreign agents. Public relations is also included.

Since the shah came to the United States in October 1979 for medical care, Armao and his firm have played a visible public relations role.

An aide in Armao's New York City office, Chris Godek, said yesterday the firm has done "regular public relations work" for Princess Ashraf and the shah as the former had requested.

That has included, she said, "sending out press statements" when the shah was in the hospital in New York City and arranging for the press conferences on the deposed ruler's health Armao gave during that period.

In addition, Godek said the firm "expedited" a letter by Princess Ashraf that appeared in The Washington Post and an op-ed piece by the princess published by The New York Times, both of which attacked the Ayatollah Khomeini regime in Iran.

Godek also said: "We did the ad that appeared in The Post and The Times" in December over Princess Ashraf Pahlavi's name.

In the ad, which was done in the form of a letter to United Nations Secretary General Kurt Waldheim, the charge that hundreds of thousands were killed under the shah was disputed. Instead the letter accused the Khomeini regime of killing 700 without a fair trial and declared "many thousands . . . have been deliberately butchered and lynched in all corners of Iran. . . ."

Armao continued to act as a spokesman for the shah during his Dec. 2 to 15 stay at Lackland Air Force Base hospital in Texas.

In addition, according to informed sources, he sat in on meetings between the former ruler and white House aides Hamilton Jordan and Lloyd Cutler. At those meetings understandings were reached as to what aid the United States would provide the shah in Panama and in the event he wanted to return to the United States for medical treatment.

On March 10, Armao issued a statement through his New York office about the shah's declining health in Panama and the need for an operation to remove his spleen. That announcement came one day after the New York Daily News, quoting the "shah's friends", described the need for the operation and White House opposition to the return of the shah to the United States for that purpose, or to letting the operation be carried out at the American Gorgas hospital in the Canal Zone.

In Panama, Armao again acted as spokeman for the shah and chief organizer of his logistics.

In Cairo, Armao criticized the White House on April 2 for an allegedly callous attitude toward the seriously ill shah. He also said the Carter administration had violated the spirit, if not the letter, of understandings reached at Lackland.

The Foreign Agent Act is primarily a disclosure law, aimed at getting on the record the activities of individuals working on behalf of foreign governments or persons. If Armao's activites since December have brought him under purview of the act, the government will require statements to be filed covering those periods. There have been only a handful of prosecutions for alleged violation of the act during its 40 years on the books.