Let $ M $ be a smooth manifold. Let $ \mathscr C_M^\infty $ be the sheaf of $ \mathscr C^\infty $-functions on $ M $, and let $ \mathscr X $ be the $ \mathscr C_M^\infty $-module of vector fields on $ M $, i.e. $$ \mathscr X(U) = \Gamma(U,\mathrm TM) = \{\text{sections $ X\colon U\to \mathrm TM $}\} $$ for any $ U\subset M $ open, where of course $ \mathrm TM $ is the tangent bundle of $ M $.
The dual $ \mathscr C_M^\infty $-module $ \mathscr X^* $ of $ \mathscr X $ is defined by $$ \mathscr X^*(U) = \underline\hom_{\mathscr C_M^\infty}(\mathscr X,\mathscr C_M^\infty)(U) = \{\text{morphisms of $ \mathscr C_M^\infty $-modules $ \mathscr X{\restriction_U}\to \mathscr C_U^\infty $}\} $$ for any $ U\subset M $ open, where $ \mathscr X{\restriction_U} $ is the restriction of the sheaf $ \mathscr X $ to the open subsets of $ U $.
I then took $ U = M $ and I tried to show that $$ \mathscr X^*(M) \cong \mathscr X(M)^* $$ where $ \mathscr X(M)^* $ is the dual $ \mathscr C_M^\infty(M) $-module of the $ \mathscr C_M^\infty(M) $-module $ \mathscr X(M) $, but I didn't succeeded.
An obvious map $$ \mathscr X^*(M) \rightarrow \mathscr X(M)^* $$ is the one that takes $ \omega = (\omega_U)_{\text{$ U\subset M $ open}}\in \mathscr X^*(M) $ to $ \omega_M\in \mathscr X(M)^* $.
I thought that to define a map in the opposite direction $$ \mathscr X^*(M) \leftarrow \mathscr X(M)^* $$ one could start with an $ \omega\colon \mathscr X(M)\to \mathscr C_M^\infty(M) $ and define $$ \omega_U(X) = \omega(\tilde X) $$ for all $ X\in \mathscr X(U) $, where $ \tilde X $ is something like an "extension" of $ X\colon U\to \mathrm TM $ to all of $ M $. I think that such a $ \tilde X $ could be defined using partitions of unity, but I'm not sure about that so I'm asking here for help.
Any covector field $\omega$ on $M$ defines a $C^\infty(M)$-linear map $\mathfrak{X}(M)\to C^\infty(M), X\mapsto \omega(X)$. A standard key result is the following:
Result A. A map $\varphi\colon\mathfrak{X}(M)\to C^\infty(M)$ is induced by a covector field on $M$ as above iff it is $C^\infty(M)$-linear. In this case, the covector field $\omega$ is determined as follows: given $p\in M$ and $v\in T_pM$, we have $\omega_p(v)=\varphi(X)$, where $X\in\mathfrak{X}(M)$ is any vector field such that $X_p=v$.
Now, given $\omega\in\mathfrak{X}(M)^*$, we will also write $\omega$ for the corresponding covector field on $M$. We can then define $\widehat{\omega}\in\mathfrak{X}^*(M)$ by $\widehat{\omega}_U(X)=\omega|_U(X)$ for any $X\in\mathfrak{X}(U)$. This defines a $C^\infty(M)$-linear map $\mathfrak{X}(M)^*\to\mathfrak{X}^*(M), \omega\mapsto\widehat{\omega}$. You already defined a $C^\infty(M)$-linear map $\mathfrak{X}^*(M)\to\mathfrak{X}(M)^*, \varphi\mapsto\varphi_M$. It is clear that the composite $\mathfrak{X}(M)^*\to\mathfrak{X}^*(M)\to\mathfrak{X}(M)^*$ is the identity map, and we now want to show the same holds for $\mathfrak{X}^*(M)\to\mathfrak{X}(M)^*\to\mathfrak{X}^*(M)$. Given $\varphi\in\mathfrak{X}^*(M)$, write $\omega=\varphi_M$, considered as a covector field on $M$. For $U\subseteq M$ an arbitrary open, we can find an open cover of $U$ by subsets $V_i$ such that there exists a smooth bump function $\chi_i\in C^\infty(M)$ with $\chi_i|_V\equiv 1$ and $\chi_i|_{X\setminus U}\equiv 0$ for all $i$. Suppose given $X\in\mathfrak{X}(U)$. If we can show that $\widehat{\omega}_{V_i}(X|_{V_i})=\varphi_{V_i}(X|_{V_i})$ for all $i$, then the sheaf conditions imply that $\widehat{\omega}_U=\varphi_U$, and since $U$ was arbitrary, this would show that $\widehat{\omega}=\varphi$ and finish the proof. Therefore, we are going to show that $\widehat{\omega}_{V_i}(X|_{V_i})=\varphi_{V_i}(X|_{V_i})$ for all $i$. For fixed $i$, we can find $\widetilde{X}\in\mathfrak{X}(M)$ such that $\widetilde{X}|_{V_i}=X|_{V_i}$ using the bump function $\chi_i$. For arbitrary $p\in V_i$, we thus find $$\widehat{\omega}_{V_i}(X|_{V_i})=\omega|_{V_i}(X|_{V_i})=\omega|_{V_i}(\widetilde{X}|_{V_i})=(\omega(\widetilde{X}))|_{V_i}=(\varphi_M(\widetilde{X}))|_{V_i}=\varphi_{V_i}(\widetilde{X}|_{V_i})=\varphi_{V_i}(X|_{V_i}).$$ Since $i$ was arbitrary, we are done.