With rapidly increasing information on the Internet, it can be more difficult and time consuming to find what one really wants, especially in e-commerce. Systems and methods based on machine learning are emerging to generate recommendations based on various factors. Existing methods face issues such as data sparsity and cold starts. To alleviate their effects, this paper proposes a novel social recommendation method combined with a restricted Boltzmann machine model and trust information to improve the performance of recommendations. Specifically, users’ preferences and ratings of items are used as data inputs in a restricted Boltzmann machine model to learn the probability distribution. In addition, user similarities are calculated by weighting user similarity and user trust values derived from trust information (i.e., trust statements explicitly given by users). Predictions are made by integrating user-history ratings and ratings of trusted users from a well-trained restricted Boltzmann machine model. Experimental results show that the proposed method has better prediction accuracy than other common collaborative filtering algorithms of machine learning.