Collaborative filtering is one of the most widely used techniques for recommendation system which has been successfully applied in many applications. However, it suffers from the cold start users who rate only a small fraction of the available items. In addition, these methods can not indicate confidence they are for recommendation. Trust-based recommendation methods assume the additional knowledge of a trust network among users and can alleviate the cold start users, since users only need to be simply connected to the trust network. On the other hand, the sparse user item ratings lead the trust-based method to consider ratings of indirect neighbors that are only weakly trusted, which may decrease its precision. In this paper, we improved the random walk model combining the trust factor-based and the collaborative filtering method for recommendation. The trust factor is considered as important a measure of guiding recommendations. The empirical analysis on the Epinions dataset demonstrates that our method outperform other trust-based and collaborative filtering methods.