  We explore a natural action of Hecke operators acting on formal sums of
optimal embeddings of real quadratic orders into Eichler orders. By associating
an optimal embedding to its root geodesic on the corresponding Shimura curve,
we can consider the signed intersection number of pairs of embeddings. Using
the Hecke operators and the intersection pairing, we construct a generating
series that is demonstrated to be a classical modular form of weight two.
