President Reagan welcomed Philippine President Ferdinand Marcos to the White House with warm praise yesterday, citing a friendship between the two countries "forged in shared history and common ideals."

Reagan recalled the Philippine leader's role in World War II against the Japanese and said: "The values for which we struggled -- independence, liberty, democracy, justice, equality -- are engraved in our constitutions and embodied in our people's aspirations."

Reagan's praise, and the very fact of Marcos' visit, stood in sharp contrast to the cool relations between Manila and Washington during the Carter administration, which was openly critical of the Marcos government's human rights record.

The Reagan administration emphasizes what it calls quiet diplomacy when it comes to human rights issues and, in the case of the Philippines, has made it clear that security considerations are paramount in U.S. policy.

Reagan yesterday referred to that security relationship, calling it "an essential element in maintaining peace in the region." Following up on that theme, the two leaders later agreed to begin a review next April of the arrangements under which the United States maintains two key military bases in the Philippines, eight months earlier than required by the agreements governing use of the bases.

Marcos is widely reported to want a significantly increased payment for the facilities, Clark Air Force Base and the Subic naval base, which now cost the United States about $100 million annually.

As several hundred invited guests enjoyed the colorful ceremonial welcome on the South Lawn, about a hundred anti-Marcos demonstrators rallied at Lafayette Park, protesting Marcos' rule.

After Marcos had left the White House, Reagan said in answer to a question that the Philippines has made "great progress" in the area of civil liberties. Asked if it still has a long way to go, Reagan responded: "We all do."

The human rights question was not raised during the almost hour-long meeting of Reagan, Marcos and their advisers, according to a senior administration official.

Marcos, in remarks that departed from his prepared text, was effusive in his praise of Reagan and the U.S. role in the world.

"The future is being born depending upon the man who is in the White House," Marcos said. "And the man who is in the White House today is certainly creating a new future for our world."

Picking up on Reagan's theme of support for democratic principles, the Philippine leader added: " . . . At the risk of our fortunes, our lives, but most important of all, our honor, we will stand for the ideals of democracy that is our legacy from the United States of America."

A senior official said after the talks that the two leaders also had agreed on regular consultations between defense ministers, dealing with, among other issues, a U.S. role in modernizing the Philippine armed forces.

The official said that in the economic discussions, Reagan told Marcos of an Export-Import Bank decision to provide $204.5 million in guarantees to assist in financing a major new nuclear power plant in the Philippines.

Later, following a luncheon at the State Department, agreements on air transport and avoidance of double taxation of individuals and corporations were concluded.

President and Mrs. Marcos attended a state dinner last night. This is Marcos' first state visit here in 16 years, and the Philippine government and press are giving it widespread coverage, with yesterday's White House ceremonies telecast live to the Philippines. The trip is clearly designed by both governments as a symbol of a close political relationship.

Marcos is to meet today with congressional leaders and members of the House Foreign Affairs and Senate Foreign Relations committees.

One possible subject of discussion with the Senate panel is an extradition treaty between the two countries that has been negotiated but not submitted for Senate ratification.

Senate sources have indicated that there is considerable sentiment against the treaty because of the Marcos government's human rights record, and that it might prove difficult to get the two-thirds vote necessary for ratification.