President Reagan yesterday ordered U.S. Marines to war-ravaged Beirut to help ensure the departure of besieged Palestinian fighters, saying this will set the stage for broader peace efforts in Lebanon and the rest of the region.

The president's brief announcement in the White House Rose Garden followed meetings with congressional leaders, some of whom later expressed reservations about involvement of U.S. military forces in the volatile Middle East.

Reagan declared that the U.S. participation in a multinational force, which also includes French and Italian troops, was "essential for our success" in the painstakingly negotiated evacuation of the Palestine Liberation Organization combatants and leaders from Beirut.

The U.S. troops, who are to go ashore late next week in accordance with detailed plans made public here, will play "an important but carefully limited noncombatant role" lasting no more than 30 days, according to Reagan. Responding to a question, he said the Marines would be withdrawn immediately if they are shot at.

But Secretary of State George P. Shultz said "The president was not referring to some stray shot by some kook that might be fired."

Before the U.S. troops go in, Shultz said, officials would check to be certain that promised safe conditions, including a "non-hostile environment," have been achieved.

In his first news conference since taking office as secretary of state five weeks ago yesterday, Shultz said U.S. ties with both Israel and the Arab countries had been strained during the course of the summer-long fighting in Lebanon.

He expressed hope, however, that the death and destruction will provide an object lesson and "a principal motivating force" toward negotiated solutions.

"Perhaps it's a moment when people can turn their eyes from the problems of war to the problems of peace," Shultz said. "I hope so."

Wearing a pin-striped diplomatic suit adorned by a flamboyant red handkerchief peeking from his breast pocket, Shultz spoke with clear but carefully measured words and without nervousness or hesitation.

His undramatic manner, even amid an unusually dramatic situation for American diplomacy, was in contrast with the high-voltage demeanor of his predecessor, Alexander M. Haig Jr.

Shultz has been immersed in the Lebanon problem since the day he was named to the office five weeks ago and has engaged in lengthy and repeated discussions of future Mideast policy with Reagan, other officials and members of Congress. Nevertheless, he provided only sketchy clues to the course he is charting despite persistent efforts by reporters to draw him out.

Perhaps the most striking impression left by Shultz was that he is more "evenhanded" in his discussion of Israel and Arab nations than were Haig and several other previous U.S. diplomatic chiefs.

In response to the first question at the conference, Shultz, while repeating the U.S. commitment to Israeli security and saying U.S.-Israeli ties remain strong, went on to say:

"The U.S. opposed the entry of Israeli troops into Lebanon, and there were some occasions when it seemed to us that Israeli military actions were excessive, and we said so. Those times presented great strains."

Regarding the Arabs, he said, "There is no question about the fact that our relationship with our friends in the Arab world has been strained and understandably so, as they have seen the suffering in Lebanon and the great destruction in Beirut."

Shultz cited special envoy Philip C. Habib's mediation efforts, which won high praise from Shultz, Reagan and congressional leaders, and other aspects of the U.S. role in arranging the PLO withdrawal as evidence of a U.S. "fundamental commitment" to peaceful solutions and American ability to be a constructive force.

Reagan, in his Rose Garden statement, called Habib's work "magnificent," and added, "Phil never lost hope and, in the end, his spirit and determination carried the day."

Shultz called Habib "a truly great American," and Senate Foreign Relations Committee Chairman Charles H. Percy (R-Ill.) said he plans to nominate the special emissary for a Nobel peace prize.

The commitment of U.S. military forces, recommended to Reagan by Habib and approved "in principle" as part of the negotiating efforts over the July 4 weekend, was greated with less enthusiasm by lawmakers.

Senate Majority Leader Howard H. Baker Jr. (R-Tenn.) said after hearing Reagan's explanation that he has "some reservations" about placing U.S. troops in the Middle East but will support the president.

House Foreigns Affairs Committee Chairman Clement J. Zablocki (D-Wis.) said, "I continue to have serious reservations regarding the direct involvement of U.S. armed forces in the highly volatile circumstances of Beirut." Zablocki said it was his "personal preference" that U.S. troops not be involved.

White House deputy press secretary Larry Speakes, however, said he did not hear any reservations expressed by the congressional leaders during the meeting with Reagan that preceded the president's announcement.

Zablocki later expressed objection to the administration's tentative plan to report the troop movement to Congress under a non-binding provision of the War Powers Act rather than under a provision that would limit the duration of their presence in Lebanon by law.

"There is no doubt in my mind that U.S. troops are being introduced into a situation where imminent involvement in hostilities is clearly indicated by the circumstances," Zablocki said, repeating the language of the requirement for reporting under the binding provision of the 1973 law.

However, the State Department argued in a "fact sheet" that "there is no intention or expectation that U.S. forces will become involved in hostilities in Beirut."

Shultz said Reagan will decide later whether to report to Congress under the binding or non-binding provision, but the secretary of state seemed to be arguing for the less stringent report.

"If we have a basically peaceful departure situation in West Beirut and this [U.S.] government announces that its forces are going in under what it considers conditions of imminent hostilities, I wonder what the message is," Shultz said.

Reagan, in his statement, said the successful resolution of the Beirut conflict through internationally supervised evacuation should be followed by two other phases of Mideast diplomacy and action:

* "Urgent international action required to restore Lebanon's full sovereignty, unity and territorial integrity, obtain the rapid withdrawal of all foreign forces from that country and help ensure the security of northern Israel."

* Quick movement "in the context of Camp David to resolve the Palestinian issue in all its aspects, as well as other unresolved problems in the Arab-Israeli context."

Shultz, citing statements from the Israeli and Syrian foreign ministers during recent Washington visits, seemed relatively optimistic about intentions of those countries to withdraw their forces, although he also said this will be "complicated and difficult."

Regarding the broader peace effort, Shultz suggested that the language of the Camp David agreement can accommodate the expanded peace efforts he is considering, which apparently include more direct and extensive participation by Palestinians in decisions about their future.

The physical breakup of the PLO military force and leadership in days ahead, Shultz said, is no reason to slacken the efforts toward peace. To the extent that the "disruptive presence" of the PLO is reduced, "you should move in harder and faster to try to take advantage of it," he said.