The dynamical process of opinion formation within a model using a local majority opinion updating rule is studied numerically in networks with the small-world geometrical property. The network is one in which shortcuts are added to randomly chosen pairs of nodes in an underlying regular lattice. The presence of a small number of shortcuts is found to shorten the time to reach a consensus significantly. The effects of having shortcuts in a lattice of fixed spatial dimension are shown to be analogous to that of increasing the spatial dimension in regular lattices. The shortening of the consensus time is shown to be related to the shortening of the mean shortest path as shortcuts are added. Results can also be translated into that of the dynamics of a spin system in a small-world network.