We will maintain two lists, W a list of vertices and B a list of arcs. For each vertex that gets put in W we will also record the distance from x to that vertex. Initially, the list B is empty, x is placed in W and d(x,x) = 0.
The algorithm proceeds as follows:
For each vertex u in W and v not in W we calculate the number d(x,u) + wt(u,v). Select the u
and v that give the minimum value (in case of ties, chose arbitrarily). If there is no minimum then
stop and indicate that there is no path from x to y. If there is a minimum then put v in W, put (u,v)
in B and record d(x,v) = d(x,u) + wt(u,v).
Repeat the procedure until y is placed in W. The shortest path is the unique path of arcs in B that lead from x to y (most easily obtained by working backwards from y).
There is an animated explanation of this algorithm on the web.
First we construct, from the given graph G, a graph G' consisting of the vertices of odd degree in G. We join the vertices in G' with edges if there is a chain in G between them, and we label each edge by the length of the shortest path between the two endpoints. This information is obtained by using Dijsktra's algorithm in G. When all the edges of G' have been labeled, then we seek a minimum weight perfect matching in G'. The matching will tell us which vertices in G will be joined by chains of multiple edges to obtain the minimum number of edges to add to G.