The mathematical objects that these two algorithms work on are very different, one is a set of linear constraints (linear inequalities and a linear optimization function), the other a directed graph with weighted edges.
But both are used to solve optimization problems and there are all sorts of instances in mathematics where seemingly different things are somehow equivalent.
It turns out that one can convert the graph (of the shortest paths problem) into a linear optimization problem (I won't go into the details here, a perfectly good and succint explanation is on wikipedia).
Now the issue is the algorithms. An algorithm is not a problem; it is a manner of solving the problem. Are the two -algorithms- somehow similar? You could explore how the transform from graph to linear constraints is acted on by the simplex algorithm to se how that corresponds to Dijkstra's algorithm (you didn't specify the shortest path method, but that is one of them. There are others, like Bellman-Ford.) You might get something out of that but I don't see much there other than the transformation.
So you can solve shortest path problems using a linear optimization problem, but not the other way, Not all linear optimization problems can be converted to a shortest path problem.
Now to the second part of your exact question, which one is better and when. Which one is better really refers now to shortest path problems run by a particular algorithm, either (I will choose) Dijkstra's or the graph transformed and solved by Dantzig's simplex algorithm.
A good implementation of Dijkstra's is $O(E + V \log V)$ (where E is the number of edges and V is the number of vertices.
Off the top of my head, Dantzig's on the converted graph is going to be $O(V^2)$ at least because of the manipulation of the matrix of constraints.
Also, if you had to implement either from scratch, I feel like Dijkstra's is easier to implement that Dantzig's.
So there you go, final answer: use Dijkstra's (or another algorithm specifically for shortest paths in graphs), rather than a much more general linear optimization algorithm.
Best Answer
Specialized solvers are often but not always faster than general purpose solvers. I.e. a large shortest path problem can be solved faster using a shortest path algorithm than using an LP algorithm. However, state-of-the-art LP solvers are very, very fast. That means a simplistic specialized algorithm may actually loose from a good LP solver. Here are some examples using different algorithms for the assignment problem. You can do something similar: generate a large random sparse network, and see how different algorithms behave (including Dijksta and Linear Programming).