  For a binary quadratic form $Q$, we consider the action of $\mathrm{SO}_Q$ on
a two-dimensional vector space. This representation yields perhaps the simplest
nontrivial example of a prehomogeneous vector space that is not irreducible,
and of a coregular space whose underlying group is not semisimple. We show that
the nondegenerate integer orbits of this representation are in natural
bijection with orders in cubic fields having a fixed "lattice shape". Moreover,
this correspondence is discriminant-preserving: the value of the invariant
polynomial of an element in this representation agrees with the discriminant of
the corresponding cubic order.
  We use this interpretation of the integral orbits to solve three
classical-style counting problems related to cubic orders and fields. First, we
give an asymptotic formula for the number of cubic orders having bounded
discriminant and nontrivial automorphism group. More generally, we give an
asymptotic formula for the number of cubic orders that have bounded
discriminant and any given lattice shape (i.e., reduced trace form, up to
scaling). Via a sieve, we also count cubic fields of bounded discriminant whose
rings of integers have a given lattice shape. We find, in particular, that
among cubic orders (resp. fields) having lattice shape of given discriminant
$D$, the shape is equidistributed in the class group $\mathrm{Cl}_D$ of binary
quadratic forms of discriminant $D$. As a by-product, we also obtain an
asymptotic formula for the number of cubic fields of bounded discriminant
having any given quadratic resolvent field.
