Let $F$ be a real closed field i.e. $F$ has no proper real algebraic extension i.e. $F[X]/(X^2+1)$ is an algebraically closed field. For $I$ an ideal of $F[X_1,...,X_n]$ , let $V_F(I) :=\{ \bar a \in F^n : f(\bar a)=0, ,\forall f \in I \}$.
Then how to show , using model theory (like completeness or model completeness of the first order theory of real closed fields which includes ordering in the language) , that $V_F(I)$ is non-empty iff whenever $\sum_i p_i^2 \in I$ then all $p_i \in I$ ?
As pointed out by Dap in the comments, the statement of the exercise (Marker's Model Theory, Exercise 3.4.28) is wrong. In fact, neither direction holds. We say that an ideal $I\subseteq F[X_1,\dots,X_n]$ is real if $\sum_{i=1}^m p_i^2\in I$ implies $p_i\in I$ for all $1\leq i \leq m$. If $I = (X^2 + Y^2)$, then $V_F(I) = \{(0,0)\}$ is nonempty, but neither $X$ nor $Y$ are in $I$, so $I$ is not real. Conversely, the unit ideal $(1)$ is real, but $V_F((1))$ is empty.
The exercise is addressed in Marker's Errata (which is an important reference for anyone working through the book). There, Marker simply writes "Assume $I$ is prime". This fixes one direction: it's true that if $I$ is a real prime ideal, then $V_F(I)$ is non-empty (and note that the unit ideal is real but not prime). But it does not fix the other direction, since $(X^2+Y^2)$ is prime in $\mathbb{R}[X,Y]$.
There are several ways to state the real nullstellensatz (or positivestellensatz). Here is one that mirrors Marker's statement of the ordinary nullstellensatz (Theorem 3.2.11).
For any field $F$, the map $V\colon J\mapsto \{\overline{a}\in F^n\mid p(\overline{a}) = 0\text{ for all }p\in J\}$ is an inclusion-reversing map from ideals in $F[X_1,\dots,X_n]$ to algebraic sets in $F^n$. And the map $I\colon X\mapsto \{p\in F[X_1,\dots,X_n]\mid p(\overline{a}) = 0\text{ for all }\overline{a}\in X\}$ is an inclusion-reversing map from subsets of $F^n$ to ideals in $F[X_1,\dots,X_n]$. If $F$ is a formally real field, then $I(X)$ is always a real ideal.
For $X\subseteq F^n$, write $\overline{X}$ for the Zariski-closure of $X$, the smallest algebraic set containing $X$. It is easy to see that $V(I(X)) = \overline{X}$.
For an ideal $J\subseteq F[X_1,\dots,X_n]$, write $\sqrt[R]{J}$ for the real radical of $J$, the smallest real ideal containing $J$.
Theorem: Suppose $F$ is real closed. Then for any ideal $J\subseteq F[X_1,\dots,X_n]$, $I(V(J)) = \sqrt[R]{J}$. Thus the maps $V$ and $I$ give an inclusion-reversing bijection between the set of real ideals in $F[X_1,\dots,X_n]$ and the set of algebraic sets in $F^n$.
As a corollary, we get a correct version of the statement of the exercise.
Corollary: Suppose $F$ is real closed and $J\subseteq F[X_1,\dots,X_n]$ is an ideal. Then $V(J)$ is nonempty if and only if the real radical of $J$ is proper.
Proof: $V(J) = \emptyset = V((1))$ if and only if $\sqrt[R]{J} = I(V(J)) = I(V((1)) = (1)$.
You can give a model-theoretic proof of the real nullstellensatz in a way very similar to the way Marker proves the usual nullstellensatz for algebraically closed fields (Theorem 3.2.11). But you need the following three algebraic components. I think only the third is proven in Marker, but the first two are fairly straightforward exercises.
To illustrate the main idea, here's a direct proof of the corollary (without going through the proof of the general real nullstellensatz).
Proof: Suppose $F$ is real closed and $J$ is an ideal in $F[X_1,\dots,X_n]$. If $V(J)$ is nonempty, then it's easy to check that $I(V(J))$ is a proper real ideal containing $J$, and hence containing $\sqrt[R]{J}$, so $\sqrt[R]{J}$ is proper. Conversely, suppose $\sqrt[R]{J}$ is proper. Then by the characterization of the real radical above, there is some prime real ideal $P$ containing $J$. Then $F$ embeds in the formally real field $K = \text{Frac}(F[X_1,\dots,X_n]/P)$, and hence into a real closure $R$ of $K$. Let $q_1,\dots,q_m$ be generators for $J$ (using Noetherianity of $F[X_1,\dots,X_n])$). Then in $K$, and hence in $R$, the image of the variables $(X_1,\dots,X_n)$ satisfy the polynomials $q_1,\dots,q_m$, so $R\models \exists \overline{x}\, \bigwedge_{i=1}^m q_i(\overline{x}) = 0$. The theory of real closed fields is model complete (in the field language), so $F$ also satisfies this formula, and hence $V(J)\neq \emptyset$.