Shape optimization problems with non-local energies containing an attracting and a repulsive part are very commonly studied since a long time, and the interest has increased in the last decade. A quite common usual feature is to extend the problem so to consider not only sets, but more generally functions or even measures, and then the existence becomes much simpler. Coming back to the original problem, so to the existence or non-existence of optimal sets, is usually a complicate task, and in fact in general existence fails. There are actually no known results where existence holds except when the attracting part is of perimeter type (and then existence easily follows by the compactness in BV), or when optimal sets are balls. We will describe the general problem and then conclude with a new result in this direction. Some of the results that we will describe are in various collaborations with D. Carazzato, N. Fusco, M. Novaga, I. Topaloglu.