International trade can create conditions for technological innovation and productivity growth. The mechanism linking trade and innovation is simple. By increasing access to foreign markets, trade allows the best firms to exploit the economies of scale in R&D. The potential to steal market share increases as product differentiation decreases. To measure the empirical importance of this mechanism, I set up and estimate a dynamic equilibrium model with endogenous size and productivity decisions. I then illustrate how the European economic integration induced innovation in the Portuguese Moulds industry and how a potential withdrawal from the EU would negatively affect innovation.