Former prime minister Gordon Brown says community spaces prove there is an alternative to isolation.