Last date for submission of paper: unknown; Contact person: unknown; We consider a non-local shape optimization problem, which is motivated by a simple model for swarming and other self-assembly/aggregation models, and prove the existence of different phases. In particular, we show that in the large mass regime the ground state density profile is the characteristic function of a round ball. An essential ingredient in our proof is a strict rearrangement inequality with a quantitative error estimate.