Electronic commerce, also known as e-commerce, involves buying and selling products, goods and services, through electronic devices, mainly on internet and other data networks. This research study was carried out in order to analyze the impact of advertising both on social networks and on the participants' buying decisions for products, goods and services, as well as to identity the means of payment used. Finally, this study will help to know the preferences of the studied population regarding the platforms and web pages used when making purchases. For this purpose, a quantitative methodology with a descriptive-relational approach was used through a non-parametric analysis with the Chi-square test, contrasting the hypotheses and the population, with the purpose of determining the consumer's behavior in a virtual shopping environment. A measuring instrument focused on the analysis of the data obtained was applied, based on a survey administered to a population group of different ages. Additionally, the Cronbach Alpha test was used, which assesses the reliability based on the measurability tool administered to individuals over 18 years of age. One of the most relevant findings was that social networks, due to its dynamics and growing use, are a very feasible option to expand sales.