The backbone of agriculture production and food security in developing countries is smallholder farmers. Those smallholder farmers have small pieces of land and mainly rely on family labor. But in the last decades, those farmers have experienced increasing challenges such as extreme weather events, increasing dependency on fertilizers and pesticides, and increasing dependency of global markets that define the prices for their products. How will those farmers cope with those challenges? A study published in the Proceedings of the National Academy of Sciences of the USA – co-authored by School of Sustainability Professors Marty Anderies and Marco Janssen – shows that those external challenges affect the way those communities make investment decisions on their infrastructure. The international research team performed experiments in 118 small scale rice-producing communities in China, Colombia, Nepal and Thailand. The results show that the more a community is integrated with the market economy the less those communities invest in the community’s public good during the experiment. Furthermore, when communities face collective risks, this effect is amplified. Although these observations are in a behavioral experiment, they confirm anecdotal observations. Farmers may see better opportunities outside their community and move to the city or work in a nearby mine. This leads to less investment in the collective infrastructure that is needed for rice production. With increased frequency of extreme weather events, more cooperation is needed to maintain agricultural productivity. Earning more cash will benefit individual families and may also enable communities to cope with extreme events, but such a change of behavior may affect food security at a larger scale. This study shows that farmer’s behavior is changing due to market integration and increased food insecurity.