MOSCOW, MAY 27 -- President Mikhail Gorbachev went on national television tonight to urge Soviet consumers not to panic over planned price increases, declaring that a market economy was the only way forward if the Soviet Union is to get out of its deepening economic crisis.

Over the past few days, a wave of panic buying has hit Moscow and other Soviet cities, driven by fears that the ruble will lose much of its value under economic reforms announced by the government on Thursday. Non-Moscow residents have been barred from shopping in the Soviet capital for a two-week period starting Monday in an attempt to stabilize the situation.

"I appeal to you; do not give way to panic. Let's look at this soberly, and we will resolve the problem," said Gorbachev as he addressed the nation from his Kremlin office, a red Soviet flag at his side.

Referring to earlier piecemeal efforts to improve the economy, the Soviet leader said: "We failed to freeze the unchecked growth of incomes, and the situation in the consumer market failed to improve and may even have worsened. We must act immediately; otherwise . . . the situation will become more tense, difficult or, to speak frankly, dangerous."

Gorbachev's television address came as opposition legislators prepared to debate a motion of no confidence in the government of Prime Minister Nikolai Ryzhkov. The government's economic reform program, which projects a two- to three-fold increase in food prices in coming months, also have come under attack from Communist Party conservatives.

Gorbachev told Soviet citizens that the government wanted to make the transition to a market economy as painless as possible and would do its utmost to protect the populace from higher prices and unemployment. But he also denounced the current topsy-turvy pricing system as an insult to common sense, saying bread was so cheap that schoolchildren frequently used it to make footballs.

"The people themselves have demanded that we put an end to this situation," he declared, adding that the economic situation was likely to become even more tense in the coming months. The government already has announced that bread prices will rise by 300 percent in stages beginning July 1, with other price rises following six months later. The price of bread, which has not changed for more than three decades, is considerably cheaper than the price of grain, and farm workers sometimes use it for animal feed.

Gorbachev's 48-minute address marked the start of a campaign by government officials to sell the public on the need for the economic-reform package, which they insist will fail without support from the citizenry.

Looking nervous and consulting his text often, the Soviet leader appealed for national consensus on the plan, but he made no mention of a referendum on the issue that two of his top aides had pledged last week. He denounced political opposition groups for putting forward "unacceptable, ultimatum-like demands" that he said could torpedo the cause of economic reform, and he accused some politicians of placing personal ambitions ahead of the interests of the country.

The public backlash against the reform plan has created an unstable domestic political situation on the eve of Gorbachev's departure for Canada en route to his summit meeting with President Bush in Washington.

Coal miners in the Ukraine have announced that they will consider a strike on June 11 as a protest against the plan, and this weekend saw the founding of yet another political opposition group, the Russian Democratic Party.

Led by former Communist Nikolai Travkin, the Democrats have the distinction of being the first major party here to denounce socialism as a goal. "We want to return Russia to the civilized community of nations with rights for individual freedom and freedom of enterprise," said Georgy Khatsenkov, one of the leaders of the new party. "Our first aim is to get rid of the Communist Party."