Corresponding author:xycheng@ntu.com Abstract. As the commodities of e-commerce are more and more rich, more and more consumers are willing to choose online shopping, because of these rich varieties of commodity information, customers will often appear aesthetic fatigue. Therefore, we need a recommendation algorithm according to the recent behavior of customers including browsing and consuming to predicate and intelligently recommend goods which the customers need, thus to improve the satisfaction of customers and to increase the profit of e-commerce. This paper first discusses recommendation algorithm, then improves Apriori. Finally, using R language realizes a recommendation algorithm of commodities. The result shows that this algorithm provides a certain decision-making role for customers to buy commodities.