It's also true that in third world and very undeveloped countries (Africa and the Middle East, mainly) you find not only more religion, but are more likely to find extreme and violent interpretations of it. In the end, it boils down to affluence, education, and opportunity, I think. Those things empower people, and so I think a person is less likely to find meaning in beheading people or blowing up civilization if they have opportunity and choices and education.
There are countries in South America that are very poor and which aren't violently oppressive with their religion, but I think a lot of that has to do with the fact that they are not isolated. Rural Pakistan is isolated.
The Middle East by world standards is not especially poor, and, in any case, the nations that sponsor and propagate the most violent readings of religion are, in fact, some of the wealthiest in the region. The conflicts that beset the poorest countries in Africa, even in places like Mali and CAR, aren't more than superficially religious, or even tribal, in nature.
There is also the example of India, which is intensely religious, yet is so diverse that one can only make assumptions about correlations between religiosity and economic development that
threatens one's credibility.