The Philippines, which once was an American colony and for its 32 years of independence has been a close U.S. ally, has agreed to spend as much as $1.8 million over three years to improve its image in the United States.

President Marcos and his wife, Imelda, have made no secret of their dismay at a spate of newspaper and magazine stories describing their enormous financial empire and the rapidly acquired wealth of some of their close friends. Some have alleged that across friends have taken kickbacks.

In an attempt to counter the effect of such articles and of other critical of Marcos five-year-old martial law regime, the Philippine government signed a contract recently with Doremuse & Co., a public relations firm with offices in New York, Washington, San Francisco and Minneapolis.

The Marcos' new interest in its image in the United States presumably also reflects concern over the activities of the U.S. - Based Movement for a Free Philippines, headed by Raul Manglapus, which seeks to turn American opinion against the Marcos government.

The catalogue of services which Doremus has promised to provide for the Philippines includes placing "stories in the most highly respected daily and weekly newspapers across the country and in news magazines, business periodicals and travel and trade publications," according to documents filed with the Justice Department.

The Philippines is Doremus fifth foreign government. It also handles public relations and information for Sudan, Saudi Arabia, Jordan and Spain.

Philippine Consul General in New York Ernesto C. Pineda declined to comment about the Doremus agreement, the details of which were filed with the Justice Department Jan. 24. When asked why Philippines had hired a public relations adviser, a spokesman said, "I guess everybody nees one, especially misunderstood countries."

The spokesman said that the Philippines has received a bad deal in the U.S. press and hoped now it "would get a fair shake."