The goal of socialism is communism.
Vladimir Lenin
And to achieve that goal requires capitalism is its "State" form. As per Lenin himself:
"State capitalism would be a step forward as compared with the present state of affairs in our Soviet Republic. If in approximately six months’ time state capitalism became established in our Republic, this would be a great success and a sure guarantee that within a year socialism will have gained a permanently firm hold and will have become invincible in this country."
Taken from published work, May 1921' under the title "A Tax in Kind"
and
"The state capitalism, which is one of the principal aspects of the New Economic Policy, is, under Soviet power, a form of capitalism that is deliberately permitted and restricted by the working class. Our state capitalism differs essentially from the state capitalism in countries that have bourgeois governments in that the state with us is represented not by the bourgeoisie, but by the proletariat, who has succeeded in winning the full confidence of the peasantry."
Taken from published work, January 10, 1923' newspaper Russky Golos #2046 New York under the title "To the Russian Colony in North America"
Mikhail Bakunin tried to warn Marx himself of the dangers of using the State to achieve communist ends and how that would end in disaster and then Lenin and Stalin both prove Bakunin correct. Bakunin feared that using the State would just recreate the same dangers and to quote the infamous song by The Who, "Meet the new boss, same as the old boss!"