In this paper, we present a method for numerical computation of collective Thomson scattering (CTS). We developed a forward model, eCTS, in the electrostatic approximation and benchmarked it against a full electromagnetic model. Differences between the electrostatic and the electromagnetic models are discussed. The sensitivity of the results to the ion temperature and the plasma composition is demonstrated. We integrated the model into the Bayesian data analysis framework Minerva and used it for the analysis of noisy synthetic data sets produced by a full electromagnetic model. It is shown that eCTS can be used for the inference of the bulk ion temperature. The model has been used to infer the bulk ion temperature from the first CTS measurements on Wendelstein 7-X.