Shortest distance and calculus of variation. Every answer to the question "show that the shortest path between two points on $\mathbb{R}^2$ is the line segment joining them", seems to rely on some version of calculus of variation.
My problem with that approach is that most of them make the assumption that the path is the graph of a smooth function, rather than a generic curve. Okay, we may exclude the possibility of self-intersection, but how can we eliminate the possiblity that the curve may not be the graph of a function or not (piecewise) smooth?
 A: Not true. See: Wikipedia article: we normally define the length of a curve as a (potentially infinite) supremum of all the lengths (in the "standard" sense) of polygonal lines joining the beginning and the end of the curve and "inscribed" in the curve. We say that the curve is "rectifiable" if this supremum is finite.
With that definition, the fact that the straight line is the shortest follows pretty much immediately from the definition. Pretty much, the only slightly nontrivial bit is to prove that the length of the straight line (in this new sense) is the same as the length of the straight line (in the standard sense). This is true because, for every polygonal line "inscribed" in a straight line, the (standard) length of it is exactly the same as the (standard) length of the original straight line.

This consideration works in any $\mathbb R^n$. However, it does not scale well to other manifolds, because those may be locally homeomorphic with $\mathbb R^n$ but not locally isometric with $\mathbb R^n$. The common way of adding metric to manifolds (which is: adding a metric tensor) requires differentiability of the maps between charts in the atlas (i.e. the manifold must be differentiable), in order for the metric tensor to allow for a change in co-ordinates when switching from one chart to another. That approach scales a lot better, but requires differentiability, and in that approach, the length of the shortest path is calculated using calculus of variations. This is probably what you had in mind in your question.
