For rural areas, this question might be rather trivial given how much open space and infrastructure is already centered around farming. However, where this problem gets harder is when growing food has to be done in compact spaces commonly found in cities and urban environments. Given the inherent challenge of farming in such a condensed area, the goal for farming is to be an additional source of food. Not the primary source.
That being said, work has been done to improve the ability of people to farm in urban areas. Primarily, the use of rooftop, verticle, and indoor farming has been on the rise with a growing demand for food supply and security. In order for all three of these methods to be effective, they need to be enacted on a fairly large scale. Consider that, according to an NPR article, the average American eats nearly 2,000 pounds of food a year(Aubry, 2011). If this statistic were applied to the city of Chicago, which has a population of 2.7 million people, a whopping 5.4 million tons of food would need to be produced every year. This is obviously a monumental task to try to solve within the confines of a city environment.
Although this might seem like there are no actions an individual could take to help solve this problem. One way that you can help prepare yourself and your community for a food shortage would be to support programs and companies looking to innovate in the field of urban agriculture. Most cities will have initiatives for creating community gardens and by supporting them with time or money, you can help develop a system that can provide greater food security if something were to happen.