Recent literature has analyzed three channels through which size and patterns of a country's involvement in international trade may affect the quality of its institutions: openness, the institutional intensity of exports and the natural resources exports. Our contribution is threefold. First, we analyze these channels jointly. Second, we propose a novel way to measure institutional intensity of exports at goods level based on nearly one hundred million disaggregated bilateral trade flows that represent world trade. Third, we analyze the effects of separate export goods categories, that is, primary, fragmented, and other goods, on the rule of law. Using data for 144 countries in an instrumental variables framework, we find that geographically predetermined openness improves the rule of law. The impact of the rule of law intensity of a country’s exports on its rule of law differs for different goods categories. In particular, in our preferred specification it is only the rule of law intensity of exports of fragmented goods that matters. Finally, we do not find evidence for an institutional resource curse.