Finding the Shortest Path that connects k nodes in a graph
The state of a traversal at any point will be (a) the node you're currently at, and (b) the subset of the $k$ selected nodes you've already passed through.  Thus, you can solve this problem by constructing a new graph $G'$ that is $2^k$ times as large as the original graph $G$, and then finding the shortest path in $G'$.

In particular, each vertex of $G'$ has the form $(v,S)$ where $v \in V$ and $S$ is a subset of the $k$ selected nodes; for each edge $v \to w$ in the original graph, $G$' has the edge $(v,S) \to (w,S)$ (if $w$ is not one of the selected $k$) or $(v,S) \to (w,S\cup \{w\})$ (if $w$ is one of the selected $k$).

Unfortunately the running time of this algorithm is exponential in $k$.  I don't expect there to be a polynomial-time solution; David Richerby explains why not.