  In this paper we study a sharp Hardy-Littlewood-Sobolev (HLS) type inequality
with Riesz potential on bounded smooth domains. We obtain the inequality for a
general bounded domain $\Omega$ and show that if the extension constant for
$\Omega$ is strictly larger than the extension constant for the unit ball $B_1$
then extremal functions exist. Using suitable test functions we show that this
criterion is satisfied by an annular domain whose hole is sufficiently small.
The construction of the test functions is not based on any positive mass type
theorems, neither on the nonflatness of the boundary. By using a similar choice
of test functions with the Poisson-kernel-based extension operator we prove the
existence of an abstract domain having zero scalar curvature and strictly
larger isoperimetric constant than that of the Euclidean ball.
