SAN FRANCISCO (AP) _ U.S. and Australian officials said New Zealand has effectively withdrawn from the trilateral ANZUS alliance, but Secretary of State George Shultz said the treaty remained ''strong and vigorous.''

The Australian delegation on Monday strongly endorsed the alliance in a four-page communique issued jointly with the Americans and indicated unqualified support for the U.S. in its rift with New Zealand.

The joint statement said New Zealand's policies ''detract from individual and collective capacity to resist armed attack.''

New Zealand, which was not invited to this year's ANZUS talks, has been inactive in the alliance since February 1985 when Prime Minister David Lange announced that U.S. nuclear-armed and nuclear-powered ships would not be allowed to dock at New Zealand ports.

Shultz said the 35-year-old alliance is ''as strong and vigorous as ever, if not more so.'' He characterized the five hours of formal meetings Monday as ''a very good and productive day.''

''I miss New Zealand,'' said Shultz. ''We part as friends, but we part - on security matters.''

Australian officials said they were satisfied there was nothing they could do to reverse the Reagan administration's recent decision to subsidize wheat exports to the Soviet Union and China, both grain customers of Australia.

Australian Foreign Affairs Minister Bill Hayden, in strongly worded remarks earlier Monday, expressed the ''genuine outrage'' of Australians over the $13- a-ton U.S. subsidy.

''Is this the way the Congress of the United States treats old and firm allies?'' Hayden asked. ''Does the Congress realize that the tidal wave of protectionism it has unleashed has consequences for regional stability in which both Australia and the United States have vital interests?''

In a news conference after the talks, Hayden said he hoped Australia's protests to the U.S. would ''head off any further developments in this direction.''

On Aug. 1, the administration announced it was permitting the Soviet Union to buy up to 4 million metric tons of American wheat over the next two months.

The two allies agreed to stand firm against New Zealand, saying its policies on port and air access are harmful to the defense of the South Pacific.

Shultz said U.S. officials had made substantial efforts to persuade New Zealand to change its policies. He said that ''in the end New Zealand chose, as it has a right to do, basically to withdraw itself from the alliance by denying port access, and we're sorry about that. I miss New Zealand.''

Hayden echoed Shultz's statements, saying his country believes New Zealand's actions are detrimental to defense interests.

The American delegation reaffirmed that it is suspending its security obligations to New Zealand ''pending adequate corrective measures.'' Defense Secretary Caspar Weinberger said New Zealand requests for military equipment aid will be reviewed more carefully.

The joint statement also said the U.S. and Australia were leaving the door open for New Zealand to return to an active partnership if it ended the ban on nuclear weaponry.

In response to the communique, Lange said in a statement from Wellington, New Zealand, that ''nothing has changed.

''So far as New Zealand is concerned, we remain ready and willing to contribute our full share to the ANZUS alliance, in conventional defense terms, as we have always done,'' Lange said.