Deterioration is one of the main concerns of many food and drug products. To reduce the effects of this phenomenon, various strategies have been proposed so far. In this paper, the collaboration of distributors in two different supply chains using a shared warehouse and its impacts on the deterioration of products which is time-dependent are investigated. Moreover, innovative algorithms are proposed to extract the solution of the models in the non-integrated and integrated supply chains. Next, the cooperative game theory is used to share the benefits of the cooperation between distributors. The numerical results of the paper indicate the efficiency of the proposed strategy in reducing the cost and deterioration of the supply chains. Furthermore, to demonstrate the efficiency of the proposed model in different real-world problems, four possible categories of the deterioration rate are scrutinized. The results of this investigation denote that the strategy has high effectiveness in all categories while in the category that the deterioration rate is a linear function of the time, the saving in the deterioration cost using the strategy is greatest. Also, conducting a sensitivity analysis, it is revealed that the greater the difference in the ordering cost of distributors, the greater the effectiveness of the strategy in reducing supply chain costs.