The quark spin effects are introduced for the first time in the string fragmentation routine of the Pythia 8 Monte Carlo event generator for the simulation of $e^+e^-$ annihilation to hadrons. To describe the spin effects the string+${}^3P_0$ model of polarized hadronization with emissions of pseudoscalar and vector mesons is used. The spin effects are activated in the generator by extending the StringSpinner package, previously applied to the simulation of deep inelastic scattering off a polarized nucleon.
The generator is used to carry out simulations of $e^+e^-$ annihilation at the center of mass energy of $10.6\,\rm{GeV}$. The Collins asymmetry for back-to-back pion pairs is evaluated and compared to the asymmetry as measured by the BELLE experiment. A satisfactory agreement is found.