In this paper, we propose a measure of social capital based on behaviour in a public goods game. We conducted a public goods game within 28 groups in two similar neighbourhoods in Cartagena, Colombia, one of which had been targeted for over two years by a conditional cash transfer programme that has an important social component. The level of cooperation we observe in the 'treatment' community is considerably higher than that in the 'control' community. The two neighbourhoods, however, although similar in many dimensions, turn out to be significantly different in other observable variables. The result we obtain in terms of cooperation, however, is robust to controls for these observable differences. We also compare our measure of social capital with other more traditional measures that have been used in the literature.