Israeli Prime Minister Yitzhak Shamir, after meeting briefly yesterday with President Reagan, said he "congratulated {Reagan} on the success of the American presence in the Persian Gulf."

A senior administration official quoted Shamir as saying that the Navy escort mission in the gulf had influenced moderation at the recent Arab summit, after which eight Arab nations decided to resume diplomatic relations with Egypt.

The official said Shamir met briefly with the president and "agreed with the stand the United States had taken in the Persian Gulf." Shamir is here on a private visit.

The U.S. official said, "There's been a flirtation between Tehran and Moscow over the last few months. . . with Iran trying to court" the Soviet Union for its support in the embattled gulf.

But he said he hopes the Soviets will still cooperate with U.N. efforts to bring about a cease-fire in the 7-year-old Iran-Iraq war.

The official said Reagan told Shamir that the administration will continue to try to bring about an Arab-Israeli reconciliation.

On Thursday, in Miami Beach, Shamir called on Jordan's King Hussein to begin the process of Middle East peace talks.

Shamir urged Hussein to meet with Israel "anywhere and anytime" to talk about peace.