We consider the minimization of an energy functional given by the sum of a density perimeter and a nonlocal interaction of Riesz type with exponent α, under volume constraint, where the strength of the nonlocal interaction is controlled by a parameter γ. We show that for a wide class of density functions the energy admits a minimizer for any value of γ. Moreover these minimizers are bounded. For monomial densities of the form ∣x∣p we prove that when γ is sufficiently small the unique minimizer is given by the ball of fixed volume. In contrast with the constant density case, here the γ→0 limit corresponds, under a suitable rescaling, to a small mass m=∣Ω∣→0 limit when p<d−α+1, but to a large mass m→∞ for powers p>d−α+1.