Vienna — Yugoslavia's unprecedented economic problems struck home a few weeks ago when shoppers in Titograd rioted - over shortages of washing powder. Customers wrecked the premises of shops when detergent ran out before the majority had gotten any. Not even in the hard-pressed days immediately after World War II had consumers made such a disturbance.
It was obvious that the country's economic problems were putting a serious strain on the Belgrade government's credibility.
Soviet Premier Nikolai Tikhonov arrived in Belgrade a short time later, well aware both of Yugoslavia's economic difficulties - it has a foreign debt of some sig-naling renewed awareness of the importance of Yugoslav stability.
The Yugoslavs themselves were facing up to an uncomfortable fact: In the past few years the Soviet Union had moved into first place in their trading list, displacing West Germany and Italy.
Last year trade with the Soviets topped $7 billion, amounting to one-third of all Yugoslav trade. The Soviets supply about half of Yugoslavia's oil: Mr. Tikhonov promised 5.35 million tons this year.
As a Yugoslav commentator put it as Mr. Tikhonov arrived, this represents a ''kind of dependence'' Belgrade would rather not have, or, at least, would like to match with increased ties with the West.
The Yugoslavs managed to hold their own during this first bargaining encounter with the new Kremlin leadership. Growth in trade was contained: For 1983 it remains more or less at 1982's level. And the Yugoslavs got some of the ''economic cooperation'' they have come to prefer to further growth in ordinary commercial exchanges.
The Soviets have undertaken, for example, to finish a $120 million, 500 -megawatt thermoelectric power plant in central Yugoslavia. It is part of a bilateral cooperation plan worked out with the late Premier Alexei Kosygin in the '70s. Although the plan covered five Soviet investment credits worth more than $1 billion, the Yugoslavs have taken up only half.
The communique with Tikhonov confirmed the mutuality of bilateral relations and recognition of Yugoslav independence and nonalignment. The Yugoslavs always insist on this latter point when dealing with the Soviets. They know well that the price of that independence - like liberty - is eternal vigilance.
The Soviets seem to have been content to play it cool this time, or to deem it best to do so. They are always on the lookout for opportunities to increase their standing in communist but nonaligned Yugoslavia.
Stalin's successors abandoned his heavy-handed tactics, but not his desire to draw Yugoslavia back into the fold. Through the '70s, for example, there were attempts to funnel Soviet ''aid'' to the least-developed republics, where nationalist feeling might linger under the surface.
Western recession in recent years has made it much harder for the Yugoslavs to keep the Russians at bay. Although the Yugoslavs made repeated efforts to persuade the European Community to ease some trade barriers, they have had to turn more to the Eastern market.
Both the US and the West Europeans are indicating a greater awareness of this - and that a more urgent appreciation of the Yugoslav situation was needed.
During a recent visit to Belgrade, Lawrence Eagleburger, a former ambassador to Yugoslavia who is now undersecretary of state for political affairs, reassured his hosts the West felt ''an obligation to help.''
Effective April 1, a new agreement with the EC gave Yugoslavia susbstantial concessions on its exports and access to the European Investment Bank. Commercial bank creditors have agreed on a $4 billion rescue package that includes $600 million in new money and reschedules loans coming due in 1983. And governments, the International Monetary Fund, and the banks are finalizing a big package for refinancing Belgrade's debts (some $20 billion).
The relevance of Western attitudes has become in some measure as crucial as in the early '50s, when the decision was first made to sustain an independent Yugoslavia.
But however helpful the West may be, the post-Tito collective leadership will not get out of the woods unless it overcomes serious regional squabbles about economic policy and convinces its people that it is serious - despite the austerity. And Yugoslav products need to be upgraded to compete on Western markets.
Comparisons are drawn with Poland's present economic plight. But there is one great difference: With its largely open, motivated society, Yugoslavia is infinitely better placed to overcome its problems.