This study proposes a mathematical model that makes it possible to rewrite the general architecture of business to customer (B2C) e-commerce systems to use sharing economy models and mechanisms to extend the commerce system and increase its accessibility. To this end, while presenting the utility function of e-commerce systems, developing this function has been proposed as the function to respond to customers' requests. In the function of response to the customer demands, the activities of each business enterprise are investigated to meet the customers' needs inside and outside the commerce system. To derive the utility function of the B2C e-commerce system, by considering the concept of activities in the local business system and other business systems, while examining the e-commerce system descriptors, each index is analyzed 50 International Journal of Electronic Commerce Studies based on how it influences and is influenced by running the activity in the local business system or other business systems. Analyzing the descriptive indicators of sharing economy, the functional architecture of the sharing economics is presented as well. Based on the functional architecture of the sharing economy and the mathematical function of the e-commerce system functionality, a model for utilizing sharing economy in B2C ecommerce systems has been proposed.