PurposeThis paper aims to determine the factors that influence the consumer’s online shopping intention in the current pandemic context (COVID-19). For this purpose, a conceptual model has been developed by introducing the constructs “attitude,” “perceived utility,” “intention” as well as the variable “perceived risk of contagion.”Design/methodology/approachAfter collecting data from the questionnaire diffused in Moroccan e-commerce websites, this study used various statistical analyses with the multiple regression model on the SPSS statistical software to confirm or refute the research hypotheses.FindingsThe results indicate that attitude and perceived utility positively affect online shopping intention. However, the variable “perceived risk of contagion” has a weak effect on such intention, which can be explained by the period in which the survey was started (a few months after the confinement).Originality/valueThe scientific contribution of this study lies in the insertion of a new factor that will be called “perceived risk of contagion” in the research model. This factor has been inspired by the perceived risk theory of Bauer (1960). Furthermore, all studies dealing with this topic have been carried out in developed countries, such as France, Great Britain, Germany and the USA. For this reason, the researcher believe that it is more appropriate to study the intention to buy online during the COVID-19 pandemic in one of the developing countries, such as Morocco. This is based on the fact that to develop theories, it is necessary to examine a given problem in several countries. The context plays a determining role in such situations.