The four-day visit of Soviet leader Mikhail Gorbachev that begins here Wednesday is being viewed as part of the new Kremlin chief's "charm offensive," as French officials put it, prior to the U.S.-Soviet summit meeting in Geneva in seven weeks.

French officials expect Gorbachev to use his official visit to France to try to turn governments and public opinion in Western Europe against President Reagan's Strategic Defense Initiative.

"What the Soviets want most of all is to get us to agree to a statement deploring the militarization of space," remarked an adviser to French President Francois Mitterrand.

French officials said Mitterrand would resist attempts by Gorbachev to drive a wedge between Western Europe and the United States by making a point of France's differences with the Soviet Union on nuclear weapons. Although France is opposed to the deployment of space-based defenses by either superpower, it has supported U.S. research into SDI on the grounds that the Soviets already are developing antimissile systems of their own.

In an interview with a French newspaper, Reagan described Gorbachev's visit as a very useful prelude to the Geneva summit. He told the conservative newspaper Le Figaro that it was important for Gorbachev to understand that the western alliance remained strong in the face of Soviet attempts to divide it.

Mitterrand is expected to raise the subject of human rights violations in the Soviet Union with Gorbachev even if, by doing so, he runs the risk of an embarrassing counteraccusation about the sinking of a Greenpeace ship by the French secret services.

"Even if the Greenpeace affair had never occurred, Gorbachev would find some pretext to reply to criticism on human rights. That's a risk we have to take," a senior French official said.

According to both Soviet and French officials, Paris was a natural choice for Gorbachev's international debut. The Kremlin has traditionally viewed France as the "most independent" U.S. ally in Western Europe even if Soviet commentatators continue to accuse Mitterrand, who is a Socialist, of taking a more "pro-Atlanticist" stand than any of his conservative predecessors.

By scheduling the Paris visit before the Geneva summit, according to French officials, Gorbachev is seeking to show that Soviet relations with Western Europe do not have to be subordinated to the resumption of a dialogue with the United States. There is some debate here. however, over whether the new "Europeanist" accent in Soviet foreign policy marks a significant change of strategy after years of giving prominence to the U.S.-Soviet relationship.

"All we know is that they are trying hard to give the impression that they have an alternative partner to the United States. But this could just be tactics. It's too early to tell," said a French diplomat.

For Mitterrand, Gorbachev's visit represents a welcome diversion from the Greenpeace affair, which has virtually monopolized political debate in France during the past two months. It also gives him a chance to demonstrate that the tough line he took toward the Soviet Union in the first half of his seven-year presidency has paid off.

After his election in May 1981, Mitterrand abandoned what he considered the overconciliatory policy toward the Soviet Union pursued by his right-wing predecessor, Valery Giscard d'Estaing. He suspended the annual Franco-Soviet summits and was an outspoken supporter of the deployment of U.S. cruise and Pershing II missiles in Western Europe to counterbalance the buildup of Soviet SS20s.

Mitterrand's studied coolness toward the Soviet Union coincided with an upsurge of revulsion in French public opinion against the Kremlin's treatment of dissidents, the invasion of Afghanistan and the suppression of the independent Solidarity union in Poland. It was also a convenient political counterweight to the presence of four Communist ministers in his Socialist-led coalition government.

According to French officials, the first phase in Mitterrand's policy toward Moscow ended in late 1983 after the West German parliament voted to accept the U.S. missiles. Satisfied that an East-West balance had been restored as a result of this political victory for the West, the French president then started putting out feelers for an improvement in relations with the Soviet Union.

Mitterrand paid his first presidential visit to the Soviet Union in June 1984. Aware of public opinion pressures back home, he startled Soviet leaders by lecturing them at a glittering Kremlin banquet about dissident Soviet physicist Andrei Sakharov.

"The president wants to show that you can talk to the Soviets calmly but firmly without the sky falling in on your head. When you are firm, you can also have a dialogue that is interesting," a Mitterrand aide commented.

Ironically, despite France's semi-independent position within the North Atlantic Treaty Organization, recent polls seem to show that Gorbachev's charm offensive is likely to have less impact on public opinion here than elsewhere in Western Europe. A poll commissioned for Newsweek magazine this week showed more mistrust of Gorbachev, and greater support for Reagan, in France than in either West Germany or Britain.

The Newsweek poll also showed that -- for all the French government's skepticism about SDI -- the average Frenchman is more enthusiastic about it than the average West German or Briton. Unlike Britain or West Germany, France has said it will not participate in SDI research.

Over the weekend, about 15,000 people marched through Paris in demonstrations of support for Soviet Jews who want to emigrate. The police have forbidden marches and demonstrations during Gorbachev's visit, but some human rights organizations have announced that they will hold indoor "cultural meetings" to protest Soviet policies.