Many manufacturers have started to use virtual stores as a direct distribution channel in addition to their existing indirect retail channels. These companies must now decide how to integrate these channels. The alternatives are to operate dedicated distribution channels for the virtual store and the retail stores or to extend the cooperation between the manufacturer and the retailers to include the virtual store in the existing distribution channels. In such an integrated supply chain, retail stores would continue to serve all in-store customers, but excess stock at retail stores could be used to fill some online orders. We analyze this problem from a supply-chain perspective by developing and solving mathematical models for both a dedicated and an integrated supply chain. Our mathematical models are based on a problem faced by Hewlett-Packard Company (HP) and incorporate the major parameters of a supply chain with online and in-store customers. We use the models to analyze how the supply chains can be coordinated, how the optimal supply-contract parameters can be computed, and how the supply-chain profits can be allocated between a manufacturer and its retail-channel partners. Our coordinating supply contract involves joint specification of the wholesale price, an ending-inventory subsidy, and a transfer payment from the manufacturer's virtual store to the retailer when using excess retail stock. We also compare the benefits of supply-chain integration with the benefits of supply-chain cooperation. We illustrate our analytical results with numerical examples from HP.