Mexican President Miguel de la Madrid, in pointed criticism of U.S. policy in Central America, told President Reagan today that stability in the region is threatened "by profound economic crisis and by shows of force which threaten to touch off a conflagration."

Reagan did not respond directly to the remark, but Secretary of State George P. Shultz said at a subsequent briefing that the principal problem in Central America is "not a show of force but a use of force primarily coming from Nicaragua, originating in Cuba with Soviet support, designed to intervene in the affairs of neighboring countries, primarily El Salvador."

Reagan stopped for a few hours in this resort city on the Gulf of California after two days of campaigning for Hispanic support in Florida and Texas. His meeting here with de la Madrid was designed to reaffirm friendly relations between the United States and Mexico, and the two presidents pledged economic cooperation and signed an agreement to seek long-term solutions to environmental problems along the border.

But their meeting pointed up, rather than resolved, differences between the two nations on Central America.

The differences were apparent in the welcome here for Reagan at the Government Center, where de la Madrid made his comment about "shows of force" in Central America and obliquely criticized U.S. backing for rebels opposing the leftist Nicaraguan government.

Later, in a speech here, the Mexican leader repeatedly spoke of the need for self-determination throughout Latin America.

"We are sure that the countries of Central America and the Caribbean, left to the will and perception of their peoples and freed from fear and mistrust through dialogue and diplomatic negotiation, will chart their own course and will act as responsible states in the regional, inter-American and world communities," he said.

In the same speech, he said problems between his country and the United States "are multiplying at a faster rate than solutions are being found."

Reagan, in a mixture of harmonious and diplomatic language similar to that of de la Madrid, stood his ground in responding.

Without mentioning Nicaragua, Cuba or the Soviet Union by name, Reagan repeated his familiar contention that such forces are responsible for Central American instability.

"The principle of self-determination is as important to citizens of the United States as anyone," he said with a stern glance at de la Madrid. "Our history proves it. We have fought wars for that very principle. We believe that people should be able to determine their own solutions, and that's why we've responded to calls for help from certain of our Latin American neighbors.

"We will consider it a beautiful day in the history of that region when all foreign elements, including our own, may be safely withdrawn."

De la Madrid said the Contadora group of Mexico, Panama, Colombia and Venezuela "should take the lead in promoting stability, freedom and development in Central America."

But administration officials have acknowledged that Reagan is privately impatient with the group's efforts for a regional peace settlement and is concerned that the effort may be providing world respectability to Nicaragua, which has advocated a similar peace plan.

Although Shultz praised the group's efforts today and said there has been "a little bit of progress" in Central America, Reagan did not mention the group in his remarks--a deliberate omission considered a snub by some Mexican officials and reporters.

The differences on Central America policy were further spelled out in a briefing conducted by Shultz and Mexican Foreign Secretary Bernardo Sepulveda.

Sepulveda ignored a question about the value of U.S. military exercises in Central America, which his government opposes. Shultz said the exercises, as well as providing military training for U.S. and Honduran soldiers, "make the point that the United States possesses a very considerable deterrent capability."

Earlier in the day, on Air Force One en route here from El Paso, White House spokesman Larry Speakes responded to a report Sunday in The Washington Post that said the administration has concluded that Cuban President Fidel Castro was "not serious" in a recent overture calling for withdrawal of all foreign forces and military assistance from Central America.

Speakes said Castro's original statement is being explored through third-party contacts, which another administration official identified as Panama and Colombia.

Reagan did not mention the Castro overture, which administration officials have emphasized has not been supported by any Cuban change of conduct.

In a joint appearance after their meetings today, Reagan and de la Madrid announced the border agreement, which follows months of negotiations to find a solution to water and air pollution problems along the 2,000-mile border. The two presidents promised to cooperate in scientific and educational exchanges, environmental monitoring and impact statements in an effort to solve border pollution problems.

"We need to solve these problems quickly, as they affect people in both countries," Reagan said.

In comments after nearly three hours of meetings with de la Madrid, Reagan said the border should be "a meeting place" that "provides enormous potential for cooperation that we can tap." He mentioned cooperation in controlling narcotics traffic, scientific exchanges and cooperation over water distribution problems.

Reagan also cited U.S. help in coordinating international financial measures during Mexico's debt crisis last summer. He said, "We can be pleased with the successes we've had.

"Yes, mistakes have been made . . . by our governments in their dealings with one another. Human beings err; that is to be expected. But friendship can overcome mistakes. That, too, should be understood."

Reagan said he came to "listen" and "be responsive" to Mexican concerns. He said he is "impressed" with de la Madrid's efforts to resolve economic difficulties, which include reducing Mexico's large international debt and imposing domestic austerity measures.

Reagan said that the U.S. role "is to support your efforts as best we can" and that the United States, recognizing that drought has compounded Mexico's agricultural problems, will extend additional credits to help Mexico purchase U.S. farm commodities this year.

The president said the United States hopes to negotiate a further purchase of Mexican oil for the Strategic Petroleum Reserve.

He also indicated he discussed trade issues with de la Madrid and said he is "determined to continue working out our trade problems and to reduce impediments to commerce that prevent our people from enjoying its maximum benefits."

The two leaders spoke before television cameras in the legislative chambers at the Mexican state of Baja California Sur. Reagan wore an open-necked guayabera shirt as he and de la Madrid read their statements to reporters from a desk inside the chambers.

Later, the two presidents exchanged toasts after a luncheon at the governor's residence. Reagan told de la Madrid: "I understand the economic challenges you face. They sound familiar. We've had a little economic trouble ourselves."

Reagan arrived tonight in New Orleans, where he is to speak Monday at the annual convention of the Veterans of Foreign Wars.