COPENHAGEN, DEC. 5 -- A European Community summit collapsed in disagreement today as leaders failed for the second time this year to adopt a financing package to avert bankruptcy in the next five years.

The result was particularly embarrassing because it highlighted the 12-nation group's squabbling over farm and aid policies on the eve of the U.S.-Soviet summit, where a treaty is to be signed on the much more important topic of nuclear disarmament, EC officials and diplomats said.

Pointing to the contrast, French President Francois Mitterrand said the breakdown here contributed to an image of "a Europe that is absent while others decide the future of the world."

EC leaders also expressed concern that the collapse of the two-day meeting would have a negative impact on financial markets, which already are under pressure from declining stock prices and the value of the dollar.

"This is not a disaster, but we are close to one," said Danish Prime Minister Poul Schlueter, who chaired the meeting.

The EC agreed to meet again at an emergency summit in Brussels on Feb. 11-12.

The meeting here broke down as several shifting factions battled over the sizes of EC cuts in agricultural subsidies and raises in aid to the EC's poorer members, and how it would decide each member's contribution to the EC budget.

The summit members also disagreed on a final communique, although they endorsed one-page declarations on East-West relations, a Soviet withdrawal from Afghanistan and a proposed international conference on the Middle East.

In the first of these statements, the leaders strongly endorsed the planned U.S.-Soviet treaty to scrap intermediate-range missiles, which is expected to be signed in Washington on Tuesday.

While that stance was expected, the declaration marked the first formal comment on the treaty by the EC's highest-level body since the United States and the Soviet Union reached final agreement on the pact last month.

Calling the treaty "a milestone," the 12 leaders said that they "hope that this agreement will enter into force soon."

The EC is both a trading bloc and a forum for pronouncing Western Europe's foreign policies.

EC leaders, trying to cast today's result in the most positive way, said that they had made considerable progress on the financing program but needed more time to reach a final agreement.

"It is best to accentuate the positive," British Prime Minister Margaret Thatcher said, adding that the talks "give a very good basis for agreement, I hope, in eight or so weeks."

Unlike at the last EC summit, in June, Thatcher did not stand alone in blocking agreement here. But her tough demands for substantial cuts in farm subsidies continued to be a major sticking point, particularly with West Germany.

Because of the breakdown here, the EC will begin 1988 without an annual budget. It will have to finance itself on a provisional, month-to-month basis.

The lack of agreement increases the likelihood that the EC will have to delay creation of a single, unified market in Western Europe in 1992 as scheduled.

The principal aim of this summit was adoption of a medium-term financing program to lay the groundwork for establishing such a market that would have no internal trade barriers.

First, however, the EC must reduce its chronic agricultural deficits. Farm subsidies make up about two-thirds of the EC's budget, which faces a $6 billion deficit next year.

The EC has agreed in principle to adopt mechanisms called "stabilizers," which automatically reduce prices paid to farmers for grains and other products when production exceeds a specified level.

The summit members could not agree, however, on details of how the stabilizers should function. West Germany and France want adjustments to allow for higher output and, therefore, higher total subsidies than Britain and the Netherlands.

West German Chancellor Helmut Kohl and Mitterrand fear that reductions in farm subsidies would cost them farmers' votes.

In addition, the EC's northern and relatively wealthier countries are resisting proposals to double so-called "structural aid" to the group's poorer members by 1992. The less prosperous group includes Spain, Portugal, Greece and Ireland.

Finally, there are disputes over methods for calculating how much each member should contribute to the EC budget.

Italy, though proud that its economy recently has overtaken Britain's, does not want its EC bill to rise as a result. There also is pressure on Britain to contribute more.

Jacques Delors, president of the EC Commission, or executive body, was optimistic. "We've done three-quarters of the job now," he said.

Kohl said the EC had to work "very, very hard" to reach "a solid compromise" at the February meeting. Mitterrand warned that it would be "gravely wounded" if it failed.