During the early evolutionary stages of star formation, molecular outflows are produced by the shocked gas interaction between high-velocity jets driven by the protostar and the ambient material. Shocks quickly release the content of interstellar ices into the gas phase through ice sputtering and trigger a rich endothermic gas-phase chemistry. Spatially resolved molecular outflows are known to be chemically rich with the detection of several dozens of species and provide us a laboratory to test different chemical scenarios. Complex Organic Molecules (COMs), molecules based on carbon chemistry and probably at the origin of the prebiotic chemistry we see in our Solar System, have been routinely detected around protostars in large quantities. The presence of many COMs has been understood as due to warm surface chemistry triggered by UV photolysis. The recent detection of several COMs towards the protostellar outflow prototype L1157-B1 challenges our current understanding of the chemistry producing these COMs. The large distance of the source with respect to the central heating protostar (about 60 arcsec) suggests that the pre-shock material is too cold to efficiently produce COMs through warm surface chemistry. In this project, we theoretically studied the formation and evolution of COMs occurring in molecular outflows. For this purpose, the results of a state-of-the-art 1D physical shock model were applied to a gas-grain astrochemical model in order to assess whether COMs can be produced in molecular outflows through gas-phase chemistry. Then, the results of the model predictions were compared with recent observations carried out with modern sub-millimeter facilities of the prototype outflow L1157-B1. It is concluded that dimethyl ether (DME) and methyl formate (MF), the two most abundant COMs in star-forming regions can be produced in significant quantities in shock regions. The production of these COMs in shocks is mostly due to of neutral-neutral chemistry, triggered by the destruction of methanol through reactions involving atomic H forming the CH$_2$OH and CH$_3$O radicals. Nevertheless, it seems that gas-phase chemistry alone only accounts for a significant but not entire part of the observed DME and MF abundances of a few percent with respect to methanol. Alternative pathways, such as cold surface chemistry, for instance, could also play a role.