IF your image of a socialist state is the Soviet Union and if you believe East European nations are nothing more than Russian satellites, Hungary will come as a shock. Passport control and customs are almost as relaxed as in most West European countries. Going through the formalities does not give a person a sense of nervousness as similar procedures do upon arrival in Moscow.
There are no huge pictures of Hungarian leaders, including Janos Kadar. Some officials put a small statue of Lenin on their bookshelves, but this is not obligatory. And an eye trained in the Soviet Union will search in vain for slogans in Budapest. Nowhere will you find Soviet-style slogans declaring that ''The People and the Party Are One,'' or ''Long Live the Leninist Politburo.'' The people seem uninhibited in talking to foreigners. And there is no outright evidence of Big Brother watching. Of course, the secret police exist, but even in hotels frequented by Westerners, one does not get the pervasive feeling of being observed all the time. The service in Hungarian restaurants and shops is admirable. Unlike in Moscow, waiters do not make you feel guilty that your arrival has interrupted some very important activity - maybe a debriefing by the KGB, maybe a trade union meeting, but more likely, an afternoon rest.
The economy is also run quite differently than in the Soviet Union. Elements of a free market are officially accepted and encouraged. Proprietors of some small businesses not only prosper financially, but are treated as respected members of society - a few even belong to the Communist Party. Government enterprises still dominate the economy, but they increasingly use cooperatives and private entrepreneurs as suppliers.
The city looks and behaves much more like Vienna than Moscow. But make no mistake, you are inside the Soviet orbit. Hungarian officials would be the first to remind visitors that Hungary is a loyal member of the Warsaw Pact.
The reminder is not just in order to avoid angering their Soviet comrades by appearing too independent-minded. The Kadar leadership can afford to engage in all kinds of economic and social experiments because the Kremlin is satisfied with the political dominance of the Hungarian Communist Party and with its commitment to follow Soviet guidance on key foreign policy issues.
''I don't think US-Hungarian relations can be insulated from the state of relations between the United States and Soviet Union,'' a senior official in the Hungarian Foreign Ministry says. He and others suggested that being a pragmatist in a small Central European country like Hungary means to recognize some basic geopolitical realities, including that the Russian presence is a fact of life. Moreover, they emphasized that when it rains on superpower relationships, it usually pours in Budapest. When the Reagan administration decided to apply sanctions against Poland, the Hungarians discovered considerable difficulties in securing Western credits. ''A climate of hostility and political uncertainty between East and West certainly does not make our search for better relations with the US any easier,'' the official said.
Yet while proclaiming basic loyalty to the Soviet Union, he was careful to stress that Hungarian foreign policy is being made in Budapest rather than Moscow. The official pointed out that contacts between Hungary and the US have improved since 1976 - during a period of deterioration of US-Soviet ties. Together with other Warsaw Pact states, the Hungarians are on the record as denouncing the deployment of US Pershing II and cruise missiles in Europe. Yet, unlike the Soviets, they do not attempt to project the image that it amounts to a dangerous crisis.
On the contrary, officials in Budapest believe that the situation today - as disturbing as it may be - does not resemble the cold war. They argue that during the cold war there was no real dialogue between the two alliances, that the break in communications was almost complete. Today, despite the superpower polemics, the West European NATO states are willing and able to preserve contacts with the USSR. And, even more remarkably, the same is true vis-a-vis East European links to the US.
The Reagan administration has every reason to be pleased that the Kremlin has failed to intimidate Eastern Europe into blindly following the Soviet's blatantly anti-American policy. The deployment of US missiles has not led to a major crisis inside NATO, as Moscow had hoped. Rather, Soviet ''countermeasures'' and vicious polemics have generated considerable unease among the staunchest USSR Warsaw Pact allies. Why does the Politburo tolerate this East European departure from the party line? Probably because if Budapest, Bucharest, and Berlin broke with the West, it would be the Soviet Union that would be expected to compensate for lost loans. The East Europeans are encouraged to stand on their own feet, which would be impossible without economic cooperation with the West.
The dispute over missiles in Europe represented a tough test of American ties to Hungary, and the test was passed with flying colors. Still, the Reagan administration should be aware that the continuation of US-Soviet hostility puts severe strains on the East European search for foreign policy autonomy. Washington would be wise to take Eastern Europe's difficult position and sensitivities into account. There is no more effective way to address the Soviet challenge than to establish independent connections with members of the adversary's alliance.