Russia had been an ally of Sweden in the Third and Fourth Coalitions against France but, after Russia's defeat at Friedland, joined France and attacked Sweden to compel it to join Napoleon I's Continental System.
[1] Shortly after the treaty was signed, on 21 August 1810, one of Napoleon's marshals, Jean-Baptiste Bernadotte, was elected crown prince of Sweden, and he went on to found the House of Bernadotte, which remains the Royal House of Sweden.
The peace resulting from the treaty lasted until Napoleon's refusal to permit Sweden to annex Norway, which was then under the sovereignty of Denmark, an ally of France.
[2] That was followed in January 1812 by the French occupation of Swedish Pomerania for violating the Continental System since Sweden was still trading with the United Kingdom.
In April 1812, Sweden signed the Treaty of Petersburg with Russia against France.