Starbucks (Nasdaq: SBUX), the No. 1 chain of coffee shops, said it had invested $25 million in Square, the start-up specialist in mobile payments, which values the company at $3.25 billion.

Moreover, the Seattle-based chain said it will deploy Square's cellphone app, Pay With Square, by the fourth quarter, in its U.S. stores. In effect, the Square app will supersede Starbucks' proprietary app that currently processes more than a million weekly payments.

Starbucks CEO Howard Schultz will become a director of the three-year-old San Francisco company co-founded by Jim McKelvey and Jack Dorsey.

With Pay With Square, smartphone users will be able to electronically notify Starbucks baristas of their order, with their name and photo on a cashier screen. Once there's a match, the customer will receive the order and the electronic payment will be completed.

Previously, Square had mainly sold its app to small merchants, including coffee shops.

Other investors in Square include venture capital firms Sequoia Capital, Kleiner Perkins Caufield & Byers and First Round Capital. Starbucks shares fell 29 cents to $45.02 in pre-market Wednesday trading.