Soviet Foreign Minister Eduard Shevardnadze has conveyed an invitation to Prime Minister Yasuhiro Nakasone to visit the Soviet Union but reiterated today that Moscow will not negotiate Japan's claim to a set of islands that Soviet troops seized in 1945.

The invitation, Moscow's first to Nakasone, appeared to be another step forward in a thaw in the two countries' relations. However, the Japanese say no real improvement in relations is possible unless there is progress on the islands issue.

The invitation was contained in a letter from Soviet leader Mikhail Gorbachev that Shevardnadze delivered during an 80-minute meeting with Nakasone yesterday. Shevardnadze, the first Soviet foreign minister to come here in 10 years, leaves Japan today after five days of consultations.

Nakasone welcomed the invitation and said he would go if a visit would be constructive and enjoy the support of the Japanese public, according to the Japanese Foreign Ministry. That was an apparent reference to the Japanese desire for progress on the islands question, which is an emotional political issue here.

Nakasone pointed out to Shevardnadze that four Japanese prime ministers have been to Moscow but that no Soviet leader has visited Japan. Japan has extended an open invitation for such a visit and takes Moscow's refusal as a sign that it does not consider Japan a significant power.

The last official consultations between top leaders from the two countries occurred in 1973, when Kakuei Tanaka met Leonid Brezhnev in Moscow.

Meanwhile, Soviet and Japanese officials were reported to be putting finishing touches on a communique to be released this afternoon that apparently will allow both sides to claim that they prevailed on the islands question.

Since the end of the war, the Soviets have claimed the islands, which are off Japan's northern island of Hokkaido, as part of the Kuriles chain.

The communique is expected to call for the two sides to reopen negotiations toward a peace treaty to end World War II formally and deal with "unresolved questions" left from the war. That is similar to wording contained in a 1973 communique issued by Tanaka and Brezhnev.

The Japanese claim that the "questions" referred to then were the islands. The Soviets, however, have denied that, citing other problems. Repeating the wording presumably will allow both to do the same again.

The Japanese would view any reference to the islands as a major diplomatic victory, because in past years the Soviets consistently have refused to acknowledge that any territorial dispute exists.

At a press conference this morning, Shevardnadze said concerning his government's legal and historical claims to the islands, "the Soviet understanding has not changed from the past."

Yesterday, Shevardnadze met Japanese Foreign Minister Shintaro Abe and signed technical agreements on trade and double taxation and extended an existing cultural agreement for two years.

The two sides had discussed signing a new cultural document but were unable to reach agreement on its provisions.

Japan says the current agreement, which covers such things as visits by scholars and distribution of literature, gives the Soviets better access to the Japanese public than the Japanese have to the Soviet public.