US footwear group Collective Brands has swung to a second-quarter net profit despite closing hundreds of stores.