Was not peaceful, but with a revolution. The USSR dropped the communist program a few years after the revolution but kept the name. One question in a class on comparative economic/political systems might be: if the USSR dropped communism a short time after the revolution, what economic/political system replaced communism?
You didn't ask for an example of a peaceful transition to communism. You ask for an example of a socialist government transitioning to communism. The Kerensky government prior to the October Revolution was socialist.
Chile under Allende is another example of a socialist government going communist. The only difference here is that the people of Chile were smarter than the Russians in 1917.
Norman Thomas quotes:
The American people will never knowingly adopt Socialism. But under the name of 'liberalism' they will adopt every fragment of the Socialist program, until one day America will be a Socialist nation, without knowing how it happened.
This was precisely the tactic of “infiltration” advocated by Lenin and Stalin.[3] As Communist International General Secretary Georgi Dimitroff told the Seventh World Congress of the Comintern in 1935:
"Comrades, you remember the ancient tale of the capture of Troy. Troy was inaccessible to the armies attacking her, thanks to her impregnable walls. And the attacking army, after suffering many sacrifices, was unable to achieve victory until, with the aid of the famous Trojan horse, it managed to penetrate to the very heart of the enemy’s camp."[4]
C. S. Lewis on Diabolical Democracy, Socialism, and Public Education « Conservative Colloquium
Buckley endorsed Chambers’ analysis of modern liberalism as a watered-down version of Communist ideology. The New Deal, Chambers insists, is not liberal democratic but “revolutionary” in its nature and intentions, seeking “a basic change in the social and, above all, the power relationships within the nation.”