Poland's military ruler, Gen. Wojciech Jaruzelski, returned his country to a tight Kremlin embrace today, pledging formally to increase political, military and economic ties with Soviet Bloc countries and to quash "in a most resolute manner" any attempt to change the socialist system in Poland.

The pledges, contained in a joint Soviet-Polish communique, suggest the two countries have established a closer relationship than at any time since the outbreak of worker unrest in Poland in August 1980.

Reinforcing that impression was the absence from the communique of any reference to Jaruzelski's desire to "achieve national concord," code words for reaching an accommodation with some elements of Solidarity and the Roman Catholic Church.

Jaruzelski voiced the idea in a dinner speech in the Kremlin last night when he also said that socialism in Poland should be built "on the principles of Marxist-Leninist science, taking into consideration concrete conditions with the observance of Polish traditions and culture."

The 3,000-word document was published after Jaruzelski ended his two-day visit here with a red-carpet send-off. Thousands of Muscovites, waving Soviet and Polish flags, cheered the Polish visitors along their way to the airport in what was seen as a reflection of official satisfaction with the outcome of the talks.

President Leonid Brezhnev led a large group of high-ranking officials who turned up at the airport to see off the Polish delegation.

In the communique, the Polish side set out its basic premises: Poland "is and will be a socialist state," whose "economic and political system is based on social ownership of the means of production . . . the power of the working class, of the working people . . . and the steering role" of the Polish Communist Party.

It said the imposition of martial law was taken in accord with the Polish constitution to prevent counterrevolutionary forces aided by "imperialist circles" from overthrowing the socialist system.

"It was stressed by the Polish side that any attempts to resume actions aimed at causing economic disarray, at resumption of anarchy or disturbances, at changing the social and political system will be cut short most resolutely in the future," the communique said.

It quoted Jaruzelski as saying that the Polish party had made efforts to strengthen its unity on Marxist-Leninist principles and restore its leading role in society.

The Polish negotiators made no reference to the independent trade union Solidarity, now suspended under martial law. But the document quoted the Soviet side's views on trade union activities, presumably suggesting what Moscow expects Jaruzelski to do to reorganize Poland's trade unions.

The Soviet Communist Party, the communique said, "highly values the role and significance of the trade unions in building communism, organizing socialist emulation, strengthening labor discipline, the participation in the management of production, care for the working and living conditions and conditions of rest of the working people."

The statement was interpreted by Western analysts here as suggesting that the Poles may introduce worker self-management, provided it remain under close party control.

The issue of worker self-management has been one of the principal stumbling blocks in earlier negotiations between Solidarity and the Polish authorities.

Today's joint communique contained no indications that Jaruzelski expects to open talks with Solidarity soon. Nor were there any hints that martial law may be lifted in the foreseeable future.

Moscow is known to favor the continuation of martial law for some time so the Polish party may regain its strength. Given Poland's almost total dependence on the Soviet Union's economic assistance, Moscow's view must carry considerable weight.

The communique, which was distributed by the government news agency Tass, contained full endorsement of Jaruzelski's moves since the imposition of martial law. It also quoted the two sides as having identical views on the international situation and included their joint condemnation of U.S. policies.

However, there was no mention of identical views on political efforts to resolve the Polish crisis. But the Poles seemed to have secured some additional economic assistance, and both sides pledged to promote "in every way further widening and deepening of cooperation" within Comecon, the Soviet Bloc economic organization.

The document quoted the Polish negotiators as expressing gratitude for Soviet economic assistance, particularly fuel and raw material deliveries, at a time when Poland was unable to meet its export obligations to the Soviet Union.

Jaruzelski, who was on his first foreign trip since becoming party leader in October, was accompanied by Gen. Florian Siwicki, the chief of staff; Foreign Minister Jozef Czyrek; Roman Malinowski, leader of the United Peasant Party; Democratic Party leader Edward Kowalczyk and numerous other officials.

The communique said that the United Peasant Party and the Democratic Party, two rump organizations in an alliance dominated by the Communists, also supported Jaruzelski's program.

The document said that "a detailed exchange of views" about bilateral relations underscored their military and economic alliances as "an unshakable foundation" of their ties. The Poles stated that their friendship and alliance with the Soviet Union "are the cornerstones" of Warsaw's foreign policy.

Earlier today, Jaruzelski held separate meetings with Brezhnev and Premier Nikolai Tikhonov. Their talks were conducted in a "businesslike, comradely atmosphere." Brezhnev accepted "with gratitude" an invitation to pay an official visit to Poland.