Let $V\subset\mathbb{R}^n$ compact, $\Omega\subset\mathbb{R}^n$ open, $V\subset\Omega$, $\delta:=\inf\{|x-y|\mid x\in V,y\notin\Omega\}$, $U:=\left\{x \mid |x-y|<\frac{\delta}{2}\,\,\text{for some}\,\, y\in V \right\}$. Let $\phi\in C^{\infty}_c(B_{\delta/2}(0))$ s.t. $\int\phi=1$. Let $\chi$ be the characteristic function of $U$.
I have to prove that $f:=\phi\ast\chi$ is such that
- $f\in C^{\infty}_c(\Omega)$;
- $f=1$ on $V$;
- $0\le f\le 1$ everywhere.
I've proved the first point, but I have no idea about how to prove the other two.
for (ii)
$f(x) = \int \phi(x-y)\chi(y)dy$.
Now if $x \in V$ then the integrand is non-zero if $\phi(x-y)$ is nonzero that is if $|x-y| < \delta/2$. Now the last condition holds if $y \in U$. Hence we can write
$f(x) = \int_U \phi(x-y)\chi(y)dy = \int_U \phi(x-y)dy = \int \phi(x-y)dy = 1$.
The second last inequality holds since the support of the function $\phi(x-y)$ for $x \in V$ lies within a compact set inside $U$ and hence the integral on $U$ is same as integral on whole of $\mathbb{R}^n$. Thus the property (ii) is established.
For (iii) note that since both the functions $\phi$ and $\chi$ are positive hence $f \geq 0$. To see $f \leq 1$ note that $\phi \leq 1$ and $\chi \leq 1$. Now if $x \in \Omega$
$f(x) = \int \phi(x-y) \chi(y)dy \leq \int_U \phi(x-y)dy \leq \int \phi(x-y)dy = 1 $.