1

                                                                  EXECUTION COPY

                                                                  MAIN AGREEMENT


     This Main Agreement (this "Agreement"), dated as of June 17, 1999, is
between drugstore.com, inc., a Delaware corporation ("drugstore.com"), and Rite
Aid Corporation, a Delaware corporation ("Rite Aid").

                                   RECITALS:

     Rite Aid is a leading drugstore in the United States with over 3800 stores.

     drugstore.com is a leading Web-based drugstore.

     In consideration of the agreements, covenants and conditions set forth
herein, intending to be legally bound, the parties hereto agree as follows:

Section 1.  Definitions

     Whenever used in this Agreement with initial letters capitalized, the
following terms will have the following specified meanings:

     "Above the Fold" means situated within the portion of a page that is
designed to be visible on a standard computer screen without requiring the user
to scroll horizontally or vertically through the page, currently a resolution of
800 pixels by 600 pixels (such resolution to be updated through the Term as the
drugstore.com default design resolution changes).

     "Action Links" means the hypertext links that direct users to different
areas of a single site or to new sites entirely.

     "Affiliate" means, with respect to a party, any Person that, directly or
indirectly, Controls, or is Controlled by, or is under common Control with, such
party.

     "Confidential Information" means the existence and terms of this Agreement
and all trade secrets, know-how and nonpublic information that relates to
research, development, trade secrets, know-how, inventions, source codes,
technical data, software programming, concepts, designs, procedures,
manufacturing, purchasing, accounting, engineering, marketing, merchandising,
selling, business plans or strategies and other proprietary or confidential
information, protectable under the laws of the United States or any other
nation, state or jurisdiction (including, but not limited to, any foreign
equivalents thereto).
<PAGE>

                                                                               2

     "Control" means the possession, directly or indirectly, of the power to
direct or cause the direction of the management and policies of a Person,
whether by contract or through the ownership of voting securities, including the
ownership of more than fifty percent (50%) of the equity, partnership or similar
interest in such Person.

     "Competitor" (i) of Rite Aid means (a) a Pharmacy Competitor, (b) a Third
Party that is a supermarket and/or (c) a Third Party that is a mass retail
merchandiser (such as Walmart or Target), (ii) of PCS means a Third Party
engaged in the business of pharmacy benefit management that claims to cover more
than 6,000,000 members, and (iii) of drugstore.com means (a) a Pharmacy
Competitor, (b) a Third Party that sells products or offers services typically
found in an Offline Retail Drugstore via the Internet, (c) a Third Party that is
a supermarket and/or (d) a Third Party that is a mass retail merchandiser (such
as Walmart or Target).

     "Derivative" means (a) any enhancement, improvement or modification or (b)
any "derivative work" (as such term is defined in the U.S. Copyright Act, as
amended from time to time).

     "Drugstore Chain" means any Third Party that Controls 10 or more Offline
Retail Drugstores whether or not all such stores operate under the same name or
Trademark.

     "drugstore.com IPR" means (i) any and all IPR owned or licensable without
cost to drugstore.com by drugstore.com or any entity that it Controls, and (ii)
all Rite Aid Technology Derivatives and Derivatives of Rite Aid Technology
Derivatives made by or at the direction of drugstore.com or any entity that it
Controls.

     "drugstore.com Site" means the site currently located at www.drugstore.com
(and any successor site, Mirror site or sites of any entity Controlled by
drugstore.com).

     "Effective Time" has the meaning given to it in Section 16.14.

     "Home Page" means (i) with respect to the drugstore.com Site, the page that
is displayed to the user when the URL www.drugstore.com or any successor URL is
entered, (ii) with respect to the Rite Aid Site, the page that is displayed to
the user when the URL www.riteaid.com or any successor URL is entered, and (iii)
with respect to the PCS Site, the page that is displayed to the user when the
URL www.PCSRx.com or any successor URL is entered.

     "including" or "included," when used herein, shall be deemed to be followed
by the words "without limitation."

     "Internet" means the Internet or the World Wide Web (or any successor or
other online network including those using delivery over television, cable, set
top boxes,
<PAGE>

                                                                               3

intranets, extranets and personal digital assistants (but not including using
any personal digital assistant or other device as a telephone)).

     "IPR" means any copyright, Trademark, patent, trade secret, moral right or
other intellectual property or proprietary right of any kind (including
applications therefor and, in the case of patents, any continuation or
divisional patent applications claiming priority thereto), whether arising under
the laws of the United States or any other nation, state or jurisdiction
(including any foreign equivalents thereto).

     "Joint IPR" means (i) any Derivatives of (a) Rite Aid Technology or (b)
Rite Aid Technology Derivatives, or (ii) any new IPR, in each case that is
created jointly by, or at the direction of, the parties.

     "Mirror site" means an Internet site that (i) contains the exact form and
content of a site, (ii) is located at a geographic location distinct from a site
and (iii) is created for the purpose of improving the performance of and
accessibility to a site.

     "Offline Retail Drugstore" means any Third Party drugstore that allows
customers to pick up orders for products at that drugstore.

     "PCS" means PCS Health Systems, Inc., a Delaware corporation.

     "PCS Preferred Network" means any retail network of Offline Retail
Drugstores established by PCS to fill drugstore.com customer orders for local
prescription pickup.

     "PCS Site" means the site currently located at www.PCSRx.com (and any
successor site, Mirror site or sites of any entity Controlled by PCS).

     "Permitted Store" means a Rite Aid retail drugstore and an Offline Retail
Drugstore that is a member of the PCS Preferred Network.

     "Person" means any individual, corporation, partnership, limited liability
company, trust, association or other entity or organization, including any
governmental or political subdivision or any agency or instrumentality thereof.

     "Pharmaceutical Products" means any product that under law may not be
dispensed except pursuant to a prescription dispensed by a licensed
professional.

     "Pharmacy Agreement" means the Pharmacy Supply and Services Agreement dated
the date hereof between drugstore.com and Rite Aid.

     "Pharmacy Competitor" means any Third Party that is a Drugstore Chain or
whose business substantially consists of the sale of Pharmaceutical Products to
consumers.
<PAGE>

                                                                               4

     "Pharmacy Services Page" means the first page a user sees on the
drugstore.com Site after clicking on the pharmacy tab, currently located at
www.drugstore.com/pharmacy.

     "Rite Aid Formulary" means Rite Aid's or PCS's list of approved
Pharmaceutical Products and vendors.

     "Rite Aid IPR" means any and all IPR owned or licensable without cost to
Ride Aid by Rite Aid or any entity that it Controls, including the Rite Aid
Technology and the Rite Aid Technology Derivatives and Derivatives of Rite Aid
Technology Derivatives made by or at the direction of Rite Aid or any entity
that it Controls.

     "Rite Aid Site" means the site currently located at www.riteaid.com (and
any successor site, Mirror site or sites of any entity Controlled by Rite Aid).

     "Rite Aid Technology" means the software (in both source and object code
forms) set forth on Exhibit A, to the extent owned or licensable (without cost
to Rite Aid) by Rite Aid during the Term.

     "Rite Aid Technology Derivative" means a Derivative of any Rite Aid
Technology.

     "Rite Aid Trademarks" means the Trademarks owned by Rite Aid set forth on
Exhibit B.

     "Rollover Bar" means the textual bar that is displayed below the tabs on a
page.

     "Series E Preferred Stock Purchase Agreement" means the Series E Preferred
Stock Purchase Agreement of even date herewith by and among drugstore.com, Rite
Aid, General Nutrition Companies, Inc. and General Nutrition Investment Company.

     "Stock" means the capital stock of drugstore.com purchased by Rite Aid
pursuant to the Series E Preferred Stock Purchase Agreement.

     "Term" means the period commencing on the Effective Time and ending on the
tenth anniversary of such date, subject to extension in accordance with Section
15.5.

     "Third Party" means any Person that is not a party hereto or a wholly owned
Affiliate of a party hereto.

     "Trademark(s)" means all common law or registered trademarks, logos,
service marks, trade names, Internet domain names and trade dress rights and
similar or
<PAGE>

                                                                               5

related rights arising under any of the laws of the United States or any other
country or jurisdiction, whether now existing or hereafter adopted or acquired.

Section 2.  Payer Contracts

     Rite Aid will use commercially reasonable efforts to assist drugstore.com
in obtaining provider numbers from payers engaged in the business of
establishing and administering networks of pharmacies at which prescriptions for
Pharmaceutical Products may be filled for individuals whose prescriptions are
paid for by insurers, health plans and other Third Parties.

Section 3.  Pharmacy Information

     3.1  Subject to customer and any other required consents, the parties will
(i) share customer insurance and drug profiles to pre-populate customer profiles
on the drugstore.com Site and (ii) systematically and promptly update each
other's shared customer profiles to reflect any new information acquired with
respect to any such profiles.  Rite Aid will provide drugstore.com with its
privacy policy for inclusion on the drugstore.com Site.  Rite Aid and
drugstore.com will, as between one and the other, own customer data related to
the sale of Pharmaceutical Products as follows:  (a) Rite Aid will own all such
data relating to customers that fill their prescriptions at Rite Aid retail
stores which prescriptions are not ordered by the customer through the
drugstore.com Site; (b) Rite Aid and drugstore.com will co-own all such data
relating to (i) customers whose orders are filled by Rite Aid under the Pharmacy
Agreement and (ii) customers whose orders are processed by drugstore.com using
the Rite Aid Technology; and (c) drugstore.com will own all other customer data.

     3.2  With respect to customers whose orders are filled by Rite Aid and
shipped by drugstore.com, Rite Aid shall neither transmit nor disclose such
customers' data to Third Parties nor shall it use such customers' data to market
to such customers.

Section 4.  Exclusivity

     4.1  Rite Aid will not, and will not permit any entity that it Controls to,
(i) directly or indirectly, sell to or take orders from consumers for products
over the Internet or (ii) promote any Person other than drugstore.com that is
engaged in any activity described in clause (i) above; provided, however, that
Rite Aid may (1)  sell products over the Internet that drugstore.com elects not
to sell after having been provided the opportunity to sell such products in
accordance with the procedures set forth below, (2) advertise the Rite Aid Site
and the PCS Site without reference to the drugstore.com Site and (3) in its
stores and on the Rite Aid Site and PCS Site, permit advertisements and other
promotional materials from manufacturers, including a reference to such
manufacturers own URL's, provided that the site referenced includes only
information and products from that manufacturer.  If Rite Aid or any entity that
it Controls desires to sell any product to consumers over the Internet pursuant
to clause
<PAGE>

                                                                               6

(1) above, it shall first offer drugstore.com the opportunity to sell such
product on the drugstore.com Site. drugstore.com will have 10 days from the date
of receipt of such notification to determine whether to sell such product. In
the event drugstore.com opts to sell such product, it must commence such sale as
soon as reasonably practicable.

     4.2  drugstore.com will not, and will not permit any entity that it
Controls to (i) promote any Offline Retail Drugstore, (ii) operate or contract
with any Person to operate or manage an Offline Retail Drugstore on behalf of
drugstore.com, (iii) operate or manage an Offline Retail Drugstore on behalf of
any Third Party, (iv) contract with any Third Party, other than Rite Aid or PCS
or their Affiliates, for the filling of orders for Pharmaceutical Products
placed on any drugstore.com Site(s), (v) promote a Pharmaceutical Product that
is not on the Rite Aid Formulary without first offering such promotional
opportunity to a manufacturer listed on the Rite Aid Formulary or (vi) operate
or establish directly or through any entity it Controls, a network of Offline
Retail Drugstores at which orders for Pharmaceutical Products can be filled;
provided, however, that the foregoing shall not prohibit drugstore.com or any
entity that it Controls from doing any or all of the following (1) with respect
to a customer whose Pharmaceutical Products are paid for, in whole or in part,
by an insurer, employer or other Third Party pursuant to a pharmacy benefit plan
administered by PCS, accepting orders for Pharmaceutical Products that are to be
available to the customer for pick-up at an Offline Retail Drugstore, provided,
that the Offline Retail Drugstore is either (A) a Permitted Store or (B) located
more than five (5) miles from a Permitted Store or (2) applying for, obtaining
and operating the drugstore.com mail order pharmacy under a provider number
assigned to drugstore.com by a pharmacy benefit manager or (3) no earlier than
nine months from the date Rite Aid is obligated to commence providing pharmacy
services at Rite Aid retail stores pursuant to the Pharmacy Agreement, with
respect to a customer whose Pharmaceutical Products are paid for, in whole or in
part, by an insurer, employer or other Third Party pursuant to a pharmacy
benefit plan administered by an entity other than PCS, accepting orders for
Pharmaceutical Products that are to be available to the customer for pick-up at
an Offline Retail Drugstore, provided that (x) any such Offline Retail Drugstore
is located more than five (5) miles from any Rite Aid retail store and (y) if
drugstore.com is contracting with any such Offline Retail Drugstore through a
pharmacy benefit plan administrator, Rite Aid has been offered the opportunity
to have Rite Aid retail stores fill orders for Pharmaceutical Products for such
customers on the same terms as such other Offline Retail Drugstore.

     4.3  Notwithstanding any of the foregoing, drugstore.com is permitted to
indicate on the drugstore.com Site the availability of retail pickup at Offline
Retail Drugstores other than those owned or operated by Rite Aid, provided, that
in those areas in which Rite Aid has a retail presence, drugstore.com customers
will always be presented with Rite Aid Offline Retail Drugstores as their first
option, including by listing all Rite Aid Offline Retail Drugstores first in any
store locator feature on the drugstore.com Site.
<PAGE>

                                                                               7

     4.4  Rite Aid will not fill orders for Pharmaceutical Products for entities
other than drugstore.com that are engaged in the dispensing of Pharmaceutical
Products to customers who place orders via the Internet (an "Internet
Drugstore").

     4.5  drugstore.com shall not (i) brand any area of the drugstore.com Site
with the Trademark of any Rite Aid Competitor, or (ii) offer for sale or promote
on the drugstore.com Site any private label product of any Rite Aid Competitor.

     4.6  The provisions of this Section 4 will not be applicable to
drugstore.com's operations outside the United States and shall not limit
drugstore.com's ability to partner with and promote an Offline Retail Drugstore
that has no Offline Retail Drugstore in the United States.  In the event any
such non-U.S. partner subsequently develops any presence in the United States,
including by purchasing an Offline Retail Drugstore in the United States,
drugstore.com shall forthwith take any actions that may be necessary to place it
in compliance with this Agreement.

     4.7  On the date Rite Aid is first obligated to commence the provision of
pharmacy services at its retail stores pursuant to the Pharmacy Agreement, Rite
Aid shall:  (i) cease accepting orders for or filling prescriptions through the
Rite Aid Site; (ii) redirect via a hypertext link all customers that visit the
Rite Aid Site to the Pharmacy Services Page; (iii) notify its customers of its
new relationship with drugstore.com by posting a notice on the Rite Aid Site;
and (iv) notify via e-mail those customers who have previously agreed to accept
e-mail messages from Rite Aid of its new relationship with drugstore.com.

Section 5.  Brands and Advertising

     The pharmacy at the drugstore.com Site shall be co-branded with a Rite Aid
Trademark.  Where feasible, all advertising material primarily relating to
pharmacy shall refer to the pharmacy as "the Pharmacy from Rite Aid and
drugstore.com."

     5.1  drugstore.com Home Page

          5.1.1  One of the Rite Aid Trademarks designated by Rite Aid shall be
featured Above the Fold on the Home Page of the drugstore.com Site.  This Rite
Aid Trademark shall not be smaller than a title of any module on the
drugstore.com Home Page with the exception of the showcase module, which shall
likely be larger.  The word "Rite Aid" shall be included in the Rollover Bar for
the "pharmacy" tab so long as the "pharmacy" tab and Rollover Bar exist on the
drugstore.com Site.

     A sample drugstore.com Home Page, indicating representative samples of what
drugstore.com considers a "title," a "module" and the "showcase module," is
attached hereto as Schedule 5.1.  Rite Aid acknowledges that the format of the
drugstore.com Home Page may evolve over the Term.  In the event drugstore.com
changes its format so that it does not use modules or titles, the parties shall
negotiate the placement of the
<PAGE>

                                                                               8

Rite Aid Trademark on the reformatted drugstore.com Home Page with the intent
that the Rite Aid Trademark shall have substantially similar prominence on the
reformatted drugstore.com Home Page.

          5.1.2  Rite Aid shall provide drugstore.com with samples of Rite Aid
Trademarks for use in advertising and on the drugstore.com Site.  Without Rite
Aid's prior written approval, drugstore.com may not use Trademarks owned by Rite
Aid other than the Rite Aid Trademarks used on the drugstore.com Site or in
connection with its advertising of the drugstore.com Site.

          5.1.3  Rite Aid shall provide drugstore.com with a set of pre-approved
statements to describe the Rite Aid pharmacy.  Any one of such statements may be
featured with the Rite Aid Trademarks on the drugstore.com Home Page.

          5.1.4  Subject to Section 5.4, the parties shall collaborate on the
content included in, and the presentation of, the Action Links, provided that
drugstore.com shall have the final right of approval with respect to such
content and presentation.

     5.2  Rite Aid and PCS Home Pages

          5.2.1  One of the drugstore.com Trademarks designated by drugstore.com
shall be featured prominently Above the Fold on the Home Pages of the Rite Aid
Site and the PCS Site together with clear reference to the pharmacy services
provided at the drugstore.com Site using statements mutually agreed upon by the
parties.  With the exception of the Rite Aid Trademark, the drugstore.com
Trademark shall not be smaller than any other Trademarks placed on the Rite Aid
Site or the PCS Site.

          5.2.2  drugstore.com shall provide Rite Aid and PCS with samples of
drugstore.com Trademarks for use in advertising and on the Rite Aid Site and the
PCS Site.  Without drugstore.com's written approval, neither Rite Aid nor PCS
may use Trademarks owned by drugstore.com other than the drugstore.com
Trademarks used on the Rite Aid Site and the PCS Site or in connection with Rite
Aid's and PCS's advertising of the Rite Aid Site and the PCS Site, respectively.

          5.2.3  Subject to Section 5.4, Rite Aid and drugstore.com and PCS,
respectively, shall collaborate on the content included in, and the presentation
of, the Action Links, provided that Rite Aid or PCS, as applicable, shall have
the final right of approval with respect to such content and presentation.

     5.3  Pharmacy Services Page

          5.3.1  At the commencement of the Term, and until changed as provided
herein, a Rite Aid Trademark designated by Rite Aid shall appear immediately
below the top navigation bar on the Pharmacy Services Page.  Any change of the
location of any such Rite Aid Trademark must be pre-approved by Rite Aid.  The
word "Rite Aid"
<PAGE>

                                                                               9

shall be included in the Rollover Bar for the "pharmacy" tab so long as the
"pharmacy" tab and Rollover Bar exist on the drugstore.com Site.

          5.3.2  At the request of drugstore.com, Rite Aid shall provide
drugstore.com with a set of Frequently Asked Questions ("FAQs") and answers
thereto to be used by drugstore.com at its option in conjunction with
drugstore.com's FAQs, provided that drugstore.com must incorporate any updates
provided by Rite Aid into any Rite Aid FAQs and answers it uses.

          5.3.3  Subject to Section 5.4, the parties shall collaborate on the
content included on the Pharmacy Services Page and use of the Rite Aid
Trademarks on the Pharmacy Services Page, provided that drugstore.com shall have
the final right of approval with respect to such content and use.

     5.4  Content

          5.4.1.  Rite Aid shall not knowingly publish on the Rite Aid Site, and
drugstore.com shall not knowingly publish on the drugstore.com Site, any
content, including Action Links, that is contrary to law or false or misleading
in any material respect.  Any content that either party reasonably determines to
be contrary to law or false or misleading in any material respect shall be
removed, upon notice from the determining party, as soon as practicable by the
offending party.  After such removal, the parties may bring the dispute to the
advertising liaisons for immediate resolution.

          5.4.2.  Rite Aid shall have final approval regarding any
representations made relating to the quality of Rite Aid pharmacy and Rite Aid
pharmacist services. drugstore.com shall have final approval regarding any
representations made relating to the quality of drugstore.com pharmacy and
drugstore.com pharmacist services.

     5.5  drugstore.com Advertising Obligations

          5.5.1  All drugstore.com advertising through a medium other than the
drugstore.com Site and primarily focused on the pharmacy services provided by
drugstore.com shall be co-branded with the drugstore.com and Rite Aid
Trademarks.

          5.5.2  Unless made in close conjunction with a reference to a Rite Aid
Trademark or in e-mails from drugstore.com to its customers, statements
regarding the pharmacists in advertising and on the pages of the drugstore.com
Site shall identify the pharmacists as "the pharmacists from Rite Aid and
drugstore.com."

          5.5.3  The parties shall collaborate on efforts related to the cross-
marketing of pharmacy services with nutritional supplements.  drugstore.com
agrees to participate in an initial project whereby Rite Aid will provide
drugstore.com with a list of 6-10 items that drugstore.com shall use for such
cross-marketing purposes.
<PAGE>

                                                                              10

drugstore.com shall have final approval with respect to any decisions relating
to any such cross-marketing.

          5.5.4  If drugstore.com generally makes available to Third Parties
banner advertisements on the drugstore.com Site, drugstore.com will use some of
its house inventory to promote the co-branded drugstore.com/Rite Aid pharmacy.
Except as set forth in Section 4.2, drugstore.com will not accept advertising
from any of (i) a Rite Aid Competitor, (ii) a PCS Competitor or (iii) an entity
not on the Rite Aid Formulary.

     5.6  Rite Aid Advertising Obligations

          5.6.1  During each year of the Term, Rite Aid shall include
drugstore.com in its advertising efforts such that the drugstore.com Trademarks
or tagline are featured in an amount of media (measured by the actual dollar
cost to Rite Aid) equal to at least 25% of Rite Aid's actual annual marketing
expenditures as reflected in Rite Aid's books and records (based on Rite Aid's
fiscal year and pro rata for any portion thereof). In all media except audio-
only media, a drugstore.com Trademark shall be displayed and in audio media,
including television and radio, the drugstore.com name must be stated.

     drugstore.com will be entitled to audit Rite Aid's applicable books and
records on an annual basis in order to monitor Rite Aid's compliance with the
foregoing obligations.  Such audit shall take place at such location where Rite
Aid maintains its books and records and during reasonable business hours and may
be assisted by drugstore.com's accountants.  In connection with any such audit,
Rite Aid shall provide drugstore.com and its accountants with access to the
applicable books and records and to appropriate employees of Rite Aid, and shall
otherwise cooperate with such audit in a reasonable manner.  All audits shall be
at the expense of drugstore.com; provided, however, that if any annual audit
reveals non-compliance by Rite Aid of 5% or more, such audit shall be at the
expense of Rite Aid.  In the event any annual audit reveals a shortfall in Rite
Aid's annual spending obligations under this Section 5.6.1, Rite Aid shall make
up such shortfall in the succeeding six months in addition to its spending
obligations during such succeeding period.  Subject to seasonality, Rite Aid
agrees that its annual spending obligations under this Section 5.6.1 shall be
spread reasonably evenly throughout each year of the Term.

          5.6.2  Rite Aid shall as soon as practicable implement the following
efforts in addition to its advertising obligations under Section 5.6.1:  (i)
drugstore.com branding on Rite Aid shopping bags and Rx bags; (ii) drugstore.com
branding on in-store signage as appropriate; (iii) printing of the drugstore.com
URL, www.drugstore.com, on cash register receipts; (iv) co-branding vial caps
(with logos and a design to be mutually agreed upon) for use with all
prescriptions filled by Rite Aid; and (v) to the extent practicable, preprinting
of the drugstore.com URL on all prescription labels used on prescriptions filled
through the drugstore.com Site.  The
<PAGE>

                                                                              11

requirements of this Section 5.6.2 shall not preclude Rite Aid from using its
current inventory, if any, of any of the foregoing items.

          5.6.3  The parties' obligations under this Section 5 shall begin as
soon as commercially reasonable following the initial promotion on
drugstore.com's Home Page of Rite Aid and its association with drugstore.com's
pharmacy services.

          5.6.4  In the event of any dispute concerning Rite-Aid's advertising-
related obligations, the parties will follow the dispute resolution procedures
set forth in Section 14.

Section 6.  Merchandising

     6.1  Rite Aid Assistance

     To assist drugstore.com in its merchandising efforts, Rite Aid will do the
following:  (i) introduce drugstore.com to its vendors; (ii) use reasonable
efforts consistent with applicable laws to encourage vendors to provide
drugstore.com best pricing and cooperative marketing opportunities; (iii) invite
drugstore.com to its annual vendor meetings and provide drugstore.com a booth at
its annual tradeshow; (iv) conduct annual category management best practices
seminars; (v) collaborate in the development of unique marketing concepts to
jointly pursue with vendors; and (vi) provide drugstore.com the right to
purchase those nonpharmacy products that Rite Aid regularly stocks in its
distribution centers directly from Rite Aid at the prices and terms set forth in
Schedule 6.1.

     6.2  Assortment

     drugstore.com will determine in its sole discretion the assortment,
pricing, promotions and other marketing and merchandising activities associated
with the drugstore.com Site.  Each party will present to the other party on a
quarterly basis their product assortment plans, although both parties
acknowledge that these plans may change in the sole discretion of the planning
party.
<PAGE>

                                                                              12

Section 7.  Technology Integration and License

     7.1  Technology Integration

     The integration of Rite Aid Technology with drugstore.com's pharmacy
systems shall take place in accordance with the specification and schedule
outlined in Schedule 7.1.  Rite Aid and drugstore.com each agree to use their
best efforts to accomplish the technology integration described in Schedule 7.1
on the schedule set forth therein.  Each party will pay its own costs associated
with the technology integration.  Rite Aid and drugstore.com will each assign to
the projects described in Schedule 7.1 at least the minimum number of technology
personnel set forth in Schedule 7.1.  As soon as practicable after the Effective
Time, the parties will agree on a procedure for resolving issues relating to
technology integration and technology support that will involve an escalation to
senior management such that all issues may be resolved as soon as possible.

     7.2  License to IPR

          7.2.1  Rite Aid hereby grants to drugstore.com, and its wholly owned
Affiliates, a royalty-free, worldwide, nonexclusive license (without any right
to transfer or sublicense) under the Rite Aid IPR, to use, copy, publicly
display, publicly perform, and create Derivatives of, the Rite Aid Technology
and Rite Aid Technology Derivatives made by Rite Aid, for use in connection with
the drugstore.com business.  The foregoing license grant is worldwide, provided
that drugstore.com shall not use, publicly display or publicly perform the Rite
Aid Technology and/or Rite Aid Technology Derivatives in or at any Offline
Retail Drugstore owned or operated by drugstore.com or any entity that it
Controls anywhere in the world.

          7.2.2  drugstore.com hereby grants to Rite Aid, and its wholly owned
Affiliates, a royalty-free, worldwide, nonexclusive license (without any right
to transfer or sublicense) under the drugstore.com IPR, to use, copy, publicly
display, publicly perform, and create Derivatives of, the Rite Aid Technology
Derivatives made by drugstore.com, for use in connection with the Rite Aid
business.  The foregoing license grant is subject to any limitations imposed by
Third Parties on drugstore.com and the terms and conditions of this Agreement,
including the exclusivity provisions set forth in Section 4.

     7.3  License to Trademarks

          7.3.1  drugstore.com hereby grants to Rite Aid and any of its wholly
owned entities a non-exclusive, royalty-free, worldwide license in all
jurisdictions in which drugstore.com has any rights, to use, reproduce,
distribute and display the drugstore.com Trademarks in connection with the Rite
Aid pharmacy operations and the agreements among the parties with respect to
merchandising and advertising.
<PAGE>

                                                                              13

          7.3.2  Rite Aid hereby grants to drugstore.com and any of its wholly
owned entities a non-exclusive, royalty-free, worldwide license in all
jurisdictions in which Rite Aid has any rights, to use, reproduce, distribute
and display the Rite Aid Trademarks in connection with the drugstore.com
pharmacy operations and the agreements among the parties with respect to
merchandising and advertising.

          7.3.3  Each party shall have the right to exercise quality control
over the use of its Trademarks by the other party to the degree necessary, in
the sole opinion of the owner of such Trademarks, to maintain the validity and
enforceability of such Trademarks and to protect the goodwill associated
therewith. Each party shall, in its use of the other's Trademarks, adhere to a
level of quality at least as high as that used by such party in connection with
its use of its own Trademarks. If the owner of a Trademark, in its reasonable
opinion, finds that use of such Trademark by the other party materially
threatens the goodwill of such Trademark, the user of such Trademark shall, upon
notice from the owner, immediately, and no later than ten (10) days after
receipt of such owner's notice, take all measures reasonably necessary to
correct the deviation(s) or misrepresentation(s) in, or misuse of, the
applicable Trademark.

          7.3.4  Each party shall use the other's Trademarks in accordance with
sound trademark and trade name usage principles and in compliance with all
applicable laws and regulations of the United States (including all laws and
regulations relating to the maintenance of the validity and enforceability of
such Trademarks) and shall not use the Trademarks in any manner that might
tarnish, disparage, or reflect adversely on the Trademarks or the owner of such
Trademarks. Each party shall use, in connection with the other's Trademarks, all
legends, notices and markings required by law. No party may materially alter the
appearance of another's Trademarks in any advertising, marketing, distribution,
or sales materials, or any other publicly distributed materials without the
prior written consent of the other party.

     7.4  Access to Rite Aid Technology

     Rite Aid will provide drugstore.com with user identifications and passwords
on an as-needed basis for the purpose of filling prescriptions for
Pharmaceutical Products.  All use of the user identifications, passwords and
Rite Aid Technology shall be subject to Rite Aid's then-current privacy, data
access, and other applicable policies.

     7.5  Reservation of Rights

     Rite Aid reserves ownership of the Rite Aid Technology.  Except as
specifically authorized or granted hereunder, no right, title or interest in, to
or under any of the Rite Aid Technology is granted, created, assigned or
otherwise transferred to drugstore.com pursuant to or by virtue of this
Agreement.

     7.6  Maintenance of drugstore.com Site
<PAGE>

                                                                              14


     drugstore.com shall use reasonable efforts to maintain the drugstore.com
Site such that up-time, scalability, back-up capability, security and response
time meet the then current generally accepted standards for E-commerce sites on
the World Wide Web.

     7.7  Amazon Technology

     Rite Aid and drugstore.com acknowledge that nothing in this Agreement will
constitute a license in, or otherwise transfer any rights relating to, any IPR
owned or Controlled by Amazon.com, Inc. or its corporate Affiliates.
drugstore.com agrees that it will not incorporate any Amazon.com, Inc.
technology or IPR into any Rite Aid Technology, Rite Aid Technology Derivative,
or any Derivative of the foregoing.

Section 8.  IPR Ownership

     8.1  Ownership by Rite Aid

     As between Rite Aid and drugstore.com, Rite Aid shall own all Rite Aid IPR.

     8.2  Ownership by drugstore.com

     As between Rite Aid and drugstore.com, drugstore.com shall own all
drugstore.com IPR.

     8.3  Underlying Work

     Notwithstanding the provisions of Section 8.1 and 8.2, the ownership of a
Derivative shall not in itself convey any ownership or exploitation rights in
the underlying work from which the Derivative was created.

     8.4  Joint Ownership

     The parties shall jointly own any Joint IPR, without any obligation to
account to the other for any revenues earned from the exploitation of the Joint
IPR.  These ownership rights are subject to the terms and conditions of this
Agreement, including the exclusivity provisions set forth in Section 4.
Notwithstanding each party's ownership interest, (i) Rite Aid shall not transfer
the Joint IPR to, or use the Joint IPR in connection with, any business that is
operated by, with or for, or branded by, with or for, a Pharmacy Competitor; and
(ii) drugstore.com shall not transfer the Joint IPR to, or use the Joint IPR in
connection with, any business operated by, with or for, or branded by, with or
for, a Pharmacy Competitor.  The foregoing limitation on ownership interests
shall survive the expiration or termination of this Agreement for any reason.

     8.5  Assistance in Perfecting Title
<PAGE>

                                                                              15

     During and after the Term, each party shall, at the other party's expense,
perform any actions and execute any documents necessary to perfect the other
party's title in its IPR.

Section 9.  Technical and Advertising Communications

     9.1  Advertising

     The parties will:

     (i) each appoint a liaison to oversee and address issues and disputes
     regarding ongoing advertising activities; and

     (ii) each appoint one senior marketing representative, that will meet on at
     least a calendar quarterly basis to discuss opportunities and establish
     advertising goals of the parties for the next calendar quarter, establish
     general long term marketing strategies and review Rite Aid's marketing
     expenditures for the prior quarter pursuant to Section 5.6.

     Any advertising-related dispute not resolved by the liaisons shall be
subject to the dispute resolution procedures set forth in Section 14.

     9.2  Joint Technology Support

          9.2.1.  As requested by drugstore.com, Rite Aid will provide to
drugstore.com copies of the Rite Aid Technology in such manner as mutually
agreed upon by the parties for use by drugstore.com in accordance with the terms
of this Agreement.

          9.2.2.  The parties will:

                 (a) each appoint a technical liaison to oversee and address
          issues regarding the parties' ongoing efforts to integrate the Rite
          Aid Technology with the drugstore.com systems; and

                 (b) provide to each other updated copies, if any, of the Rite
          Aid Technology and the Rite Aid Technology Derivatives on a periodic
          basis when available, in such manner and at such times as mutually
          agreed upon by the parties, for use by the parties in accordance with
          the terms of this Agreement.

          9.2.3 Any technology-related dispute not resolved by the liaisons
shall be subject to the dispute resolution procedures set forth in Section 14.

          9.3  Oversight
<PAGE>

                                                                              16

     Each party will appoint a senior executive officer to oversee and have
overall responsibility for the administration of this Agreement and the parties'
business relationship contemplated by this Agreement and the Pharmacy Agreement.
Such senior executive officers will meet, either in person or by telephone
conference, at least once each calendar quarter.

Section 10.    Representations and Warranties

     10.1  Representations and Warranties of drugstore.com

     10.1.1 drugstore.com hereby represents and warrants to Rite Aid:

              (a) Authorization. All corporate action on the part of
          drugstore.com, its officers, directors and stockholders necessary for
          the authorization, execution and delivery of this Agreement, the PCS
          Provider Agreement by and between drugstore.com and PCS, the Eagle
          Provider Agreement by and between drugstore.com and Eagle Managed Care
          ("Eagle"), the Addendum to Provider Agreements by and among
          drugstore.com, Rite Aid, PCS and Eagle and the Pharmacy Agreement
          (collectively, the "Agreements"), and the performance of all
          obligations of drugstore.com hereunder and thereunder has been taken,
          and the Agreements, when executed and delivered by drugstore.com, will
          constitute valid and legally binding obligations of drugstore.com,
          enforceable against drugstore.com in accordance with their terms
          except as limited by applicable bankruptcy, insolvency,
          reorganization, moratorium, fraudulent conveyance, and other laws of
          general application affecting enforcement of creditors' rights
          generally, as limited by laws relating to the availability of specific
          performance, injunctive relief, or other equitable remedies.

              (b) Intellectual Property. To its knowledge, drugstore.com owns or
          possesses sufficient legal rights to all IPR necessary for its
          business as now conducted without any conflict with, or infringement
          of, the rights of others. drugstore.com has not received any written
          communications alleging that any drugstore.com technology or
          drugstore.com Trademarks have violated or would violate any of the IPR
          of any Third Party. drugstore.com is not aware that any of its
          employees is obligated under any contract or other agreement, or
          subject to any judgment, decree or order of any court or
          administrative agency, that would interfere with such employee's
          ability to promote the interests of drugstore.com or that would
          conflict with drugstore.com's business. Neither the execution,
          delivery or performance of the Agreements, nor the carrying on of
          drugstore.com's business as now conducted by the employees of
          drugstore.com, will, to drugstore.com's knowledge,
<PAGE>

                                                                              17

          conflict with or result in a breach of the terms, conditions, or
          provisions of, or constitute a default under, any contract, covenant
          or instrument under which any such employee is now obligated.
          drugstore.com does not believe it is or will be necessary to use any
          inventions of any of its employees (or persons it currently intends to
          hire) made prior to their employment by drugstore.com

               (c) Compliance with Other Instruments. The execution, delivery
          and performance of the Agreements and the consummation of the
          transactions contemplated thereby will not result in any violation of
          or be in conflict with or constitute, with or without the passage of
          time and giving of notice, a default under any provision of
          drugstore.com's or any of its subsidiaries' charter or bylaws or any
          instrument, judgment, order, writ, decree or contract to which
          drugstore.com or any of its subsidiaries is a party or by which
          drugstore.com or any of its subsidiaries is bound, or any provision of
          any federal or state statute, rule or regulation applicable to
          drugstore.com or any of its subsidiaries, the effect of which would
          have a material adverse effect on the ability of drugstore.com or any
          of its subsidiaries to perform its obligations under the Agreements or
          result in the creation of any lien, charge or encumbrance upon any
          assets of drugstore.com or any of its subsidiaries.

                         (d) NOTWITHSTANDING ANYTHING IN THIS AGREEMENT TO THE
          CONTRARY, DRUGSTORE.COM MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY
          KIND WHATSOEVER, DIRECTLY OR INDIRECTLY, EXPRESS OR IMPLIED,
          INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY
          AND FITNESS FOR A PARTICULAR PURPOSE, WITH RESPECT TO ANY GOODS OR
          SERVICES TO BE PROVIDED UNDER THE AGREEMENTS, OTHER THAN THOSE
          EXPRESSLY SET FORTH IN THE AGREEMENTS.

     10.2  Representations and Warranties of Rite Aid

     10.2.1  Rite Aid hereby represents and warrants to drugstore.com:

              (a) Authorization. All corporate action on the part of Rite Aid,
          its officers, directors and stockholders necessary for the
          authorization, execution and delivery of the Agreements to which Rite
          Aid is a party, and the performance of all obligations of Rite Aid
          thereunder has been taken, and the Agreements to which Rite Aid is a
          party, when executed and delivered by Rite Aid, will constitute valid
          and legally binding obligations of Rite Aid, enforceable against Rite
          Aid in accordance with their terms except as limited by applicable
          bankruptcy, insolvency,
<PAGE>

                                                                              18

          reorganization, moratorium, fraudulent conveyance, and other laws of
          general application affecting enforcement of creditors' rights
          generally, as limited by laws relating to the availability of specific
          performance, injunctive relief, or other equitable remedies.

               (b) Intellectual Property. To its knowledge, Rite Aid owns or
          possesses sufficient legal rights to all IPR necessary for its
          business as now conducted without any conflict with, or infringement
          of, the rights of others. Rite Aid has not received any written
          communications alleging that any Rite Aid Technology or Rite Aid
          Trademarks have violated or would violate any of the IPR of any Third
          Party. Rite Aid is not aware that any of its employees is obligated
          under any contract or other agreement, or subject to any judgment,
          decree or order of any court or administrative agency, that would
          interfere with such employee's ability to promote the interests of
          Rite Aid or that would conflict with Rite Aid's business. Neither the
          execution, delivery or performance of the Agreements to which Rite Aid
          is a party, nor the carrying on of Rite Aid's business as now
          conducted by the employees of Rite Aid, will, to Rite Aid's knowledge,
          conflict with or result in a breach of the terms, conditions, or
          provisions of, or constitute a default under, any contract, covenant
          or instrument under which any such employee is now obligated. Rite Aid
          does not believe it is or will be necessary to use any inventions of
          any of its employees (or persons it currently intends to hire) made
          prior to their employment by Rite Aid.

              (c) Compliance with Other Instruments. The execution, delivery and
          performance of the Agreements to which Rite Aid is a party and the
          consummation of the transactions contemplated thereby will not result
          in any violation of or be in conflict with or constitute, with or
          without the passage of time and giving of notice, a default under any
          provision of Rite Aid's or any of its subsidiaries' charter or bylaws
          or any instrument, judgment, order, writ, decree or contract to which
          Rite Aid or any of its subsidiaries is a party or by which Rite Aid or
          any of its subsidiaries is bound, or any provision of any federal or
          state statute, rule or regulation applicable to Rite Aid or any of its
          subsidiaries, the effect of which would have a material adverse effect
          on the ability of Rite Aid or any of its subsidiaries to perform its
          obligations under the Agreements to which Rite Aid is a party or
          result in the creation of any lien, charge or encumbrance upon any
          assets of Rite Aid or any of its subsidiaries.

              (d) Internet Business. During the twelve (12) month period ended
          May 31, 1999, Rite Aid customers ordered 353,844 refill prescriptions
          using the Internet. For the 41 days ended May 11, 1999, Rite Aid's
          revenues from such sales were $2,559,181 (or $22,782,952 on
<PAGE>

                                                                              19

          an annualized basis for the twelve (12) month period ended May 11,
          1999).

                   (e) NOTWITHSTANDING ANYTHING IN THIS AGREEMENT TO THE
          CONTRARY, RITE AID MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND
          WHATSOEVER, DIRECTLY OR INDIRECTLY, EXPRESS OR IMPLIED, INCLUDING, BUT
          NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
          A PARTICULAR PURPOSE, WITH RESPECT TO ANY GOODS OR SERVICES TO BE
          PROVIDED UNDER THE AGREEMENTS TO WHICH RITE AID IS A PARTY, OTHER THAN
          THOSE EXPRESSLY SET FORTH IN THE AGREEMENTS TO WHICH RITE AID IS A
          PARTY.

     10.3  Survival

     The representations and warranties of drugstore.com and Rite Aid set forth
in 10.1 and 10.2 shall survive until the earlier of (i) the consummation by
drugstore.com of an underwritten public offering (an "IPO") of shares of
drugstore.com Common Stock pursuant to a registration statement filed under the
Securities Act of 1933 and (ii) ten (10) business days after the delivery by
drugstore.com to Rite Aid of drugstore.com's audited balance sheet as of
December 31, 1999 and audited statements of income and cash flows for the 12
months ended December 31, 1999.

Section 11.  Indemnification

     11.1  Indemnification

     Rite Aid and drugstore.com each shall indemnify and hold harmless the other
and its divisions, its Affiliates and its officers, directors, employees,
representatives and agents (the "Indemnified Parties") from and against (i) any
and all liabilities, suits, costs, judgments, penalties, expenses, obligations,
losses and damages arising from or related to claims or actions made by a Third
Party, including any obligation or liability which may be imposed upon any of
the Indemnified Parties as a matter of law, and constituting, or in any way
based upon, resulting from or arising out of any breach or alleged breach by
Rite Aid or drugstore.com, as applicable, of any representation, warranty,
agreement or covenant made by such party in this Agreement, and (ii) any cost or
expense (including legal fees and out-of-pocket expenses) reasonably incurred by
any of the Indemnified Parties (and their counsel) in investigating, preparing
for, defending against or otherwise taking any action in connection with any of
the foregoing (collectively "Damages").
<PAGE>

                                                                              20

     11.2  Procedure

     Subject to the provisions of Section 12, if any claim, demand, assessment
or liability or cost incidental thereto (collectively, an "Indemnified Claim"),
is asserted against an Indemnified Party in respect of which the Indemnified
Party proposes to demand indemnification from the other party (the "Indemnifying
Party") pursuant to Section 11.1, such Indemnified Party will promptly notify
the Indemnifying Party in writing.  No failure of an Indemnified Party to so
notify the Indemnifying Party shall relieve the Indemnifying Party from the
obligation to indemnify the Indemnified Party unless and to the extent the
Indemnifying Party is actually prejudiced by such failure.  Such Indemnified
Party will accord the Indemnifying Party the opportunity to assume entire
control for the defense, compromise or settlement of any such Indemnified Claim
through its own counsel and at its own expense; provided that no such compromise
or settlement shall include any non-monetary terms and conditions applicable to
such Indemnified Party without the consent of the Indemnified Party; and
provided further, that the Indemnified Party may retain its own counsel at its
own expense (the Indemnifying Party shall only be liable for the cost of one
such counsel for all Indemnified Parties) if (i) the Indemnifying Party, within
thirty (30) days after notice of any Indemnified Claim, fails to assume the
defense of such Indemnified Claim or (ii) the representation of both the
Indemnifying Party and the Indemnified Party would, in the reasonable judgment
of the parties, be inappropriate due to actual or potential conflicting
interests between them.  If the Indemnifying Party does not assume entire
control of the defense, compromise or settlement of such Indemnified Claim, the
Indemnified Party may compromise or settle any such Indemnified Claim.
drugstore.com and Rite Aid each agrees to cooperate fully with respect to the
defense of any Indemnified Claim.

Section 12.  Infringement Claims

     12.1  Legal Action for Infringement of IPR

     12.1.1  Rite Aid reserves any and all rights to commence, prosecute,
compromise and settle any claim, action or proceeding for infringement, unfair
competition, unauthorized use, misappropriation or violation of any of the Rite
Aid IPR by any Third Party.  Rite Aid may commence, prosecute, compromise or
settle any such claim, action or proceeding, as well as any claim, action or
proceeding to defend any of the Rite Aid IPR, in its sole discretion, but shall
not have any obligation to do so.  Rite Aid will keep drugstore.com apprised of
the status of any such claim, action or proceeding and notify drugstore.com if
Rite Aid elects to discontinue further prosecution or defense of the same.

     12.1.2  drugstore.com reserves any and all rights to commence, prosecute,
compromise and settle any claim, action or proceeding for infringement, unfair
competition, unauthorized use, misappropriation or violation of any of the
drugstore.com IPR by any Third Party.  drugstore.com may commence, prosecute,
<PAGE>

                                                                              21

compromise or settle any such claim, action or proceeding, as well as any claim,
action or proceeding to defend any of the drugstore.com IPR, in its sole
discretion, but shall not have any obligation to do so.  drugstore.com will keep
Rite Aid apprised of the status of any such claim, action or proceeding and
notify Rite Aid if drugstore.com elects to discontinue further prosecution or
defense of the same.

     12.1.3  No party shall have the right to commence or prosecute any legal
action with regard to the IPR of the other party, without such other party's
prior written consent in such other party's sole discretion.

     12.1.4  Each party may, at its sole expense, commence and prosecute any
claim, action or proceeding for infringement, unfair competition, unauthorized
use, misappropriation, or violation of Joint IPR by any Third Party, and the
non-prosecuting Party shall fully cooperate with the prosecuting party in such
claim, action or proceeding at the prosecuting party's expense.

     12.1.5  If either party becomes the subject of a claim, action or
proceeding for infringement, unfair competition, unauthorized use,
misappropriation or violation of any IPR of a Third Party as a result of its use
of the other party's IPR pursuant to this Agreement, then the party owning such
IPR shall upon the request of such other party defend the requesting party from
and against such claim, action or proceeding; provided that the requesting party
shall provide such assistance in defense of the claim, action or proceeding as
the owning party may request and shall comply with any settlement or court order
made in connection with the claim, action or proceeding (e.g., relating to the
future use of any infringing IPR); and provided further that, notwithstanding
the foregoing, the requesting party shall indemnify the owning party from and
shall pay any and all damages, liabilities, costs and expenses (including
reasonable attorneys fees) incurred by the owning party or otherwise arising out
of such claim, action or proceeding to the extent related to the requesting
party's use of the owning party's IPR.  In any case, the requesting party shall
be entitled to participate in the defense of any such claim, action or
proceeding, at its own cost, with counsel of its choice.

     12.1.6  In the event either party should have a claim against the other
party for infringement, unfair competition, unauthorized use, misappropriation
or violation of any of its IPR as a result of the use of its IPR by the other
party pursuant to this Agreement, the parties shall resort to the dispute
resolution provisions set forth in Section 14.

Section 13.  Additional Obligations of the Parties

     13.1  Nondisclosure

           13.1.1 A party (the "Receiving party") receiving any Confidential
Information of the other party (the "Disclosing party") will exercise a
reasonable degree
<PAGE>

                                                                              22

of care, but in no event less than the same degree of care that it uses to
protect its own confidential information of a like nature, to keep confidential
and not disclose such Confidential Information. Without limiting the generality
of the foregoing, the Receiving party shall disclose the Confidential
Information of the other party only to those of its employees and contractors
(a) who have a need to know the Confidential Information in order to exercise
its license to such Confidential Information, and (b) who are contractually
obligated to comply with the disclosure and usage restrictions set forth in this
Agreement. In addition, each party may, with the prior written consent of the
other party (which consent shall not be unreasonably withheld), disclose the
existence and terms of this Agreement to potential sources of financing who are
contractually obligated to maintain the confidentiality of such information;
provided, however, that if, after receipt of a written request for consent, the
other party does not respond to the request within three (3) business days,
consent will be deemed to have been given so long as the requested disclosure is
not to a Competitor.

     13.1.2  The obligations set forth in Section 13.1.1 above shall not apply
to any Confidential Information to the extent it: (a) is approved by prior
written authorization of the Disclosing party for release by the Receiving
party; (b) is disclosed in order to comply with a judicial order issued by a
court of competent jurisdiction, in which event the Receiving party shall give
prior written notice to the Disclosing party of such disclosure as soon as
practicable and shall cooperate with the Disclosing party in using all
reasonable efforts to obtain an appropriate protective order or equivalent,
provided that the information shall continue to be Confidential Information to
the extent it is covered by such protective order or equivalent; (c) becomes
generally available to the public through any means other than a breach by the
Receiving party of its obligations under this Agreement; (d) was in the
possession of the Receiving party without obligation of confidentiality prior to
receipt or disclosure under this Agreement as evidenced by written records made
prior to such receipt or disclosure; (e) is developed independently by the
Receiving party without the use of or benefit from any of the Confidential
Information of the other party or without breach of this Agreement, as evidenced
by written records of the Receiving party in existence as of disclosure by the
Disclosing party; or (f) is required to be disclosed by any national securities
exchange, by government rule or regulation (e.g., in connection with a
securities filing) or by any other provisions of applicable law, provided that
the Receiving party gives the Disclosing party advance written notice (to the
extent practicable) of the disclosure and cooperates with the Disclosing party
in any reasonable attempt to limit the scope of the required disclosure.  In any
dispute over whether information is Confidential Information under this
Agreement, it will be the burden of the Receiving party to show that such
contested information falls within the exceptions set forth in this Section
13.1.2.

     13.2  No Contest of Rite Aid IPR

     drugstore.com shall not contest or otherwise challenge (e.g., in any legal
action or otherwise), or assist or encourage any other Person to contest or
challenge, the
<PAGE>

                                                                              23

validity of any Rite Aid IPR; provided that the foregoing shall not preclude
drugstore.com from claiming that the IPR in question is drugstore.com IPR.

     13.3  No Contest of drugstore.com IPR

     Rite Aid shall not contest or otherwise challenge (e.g., in any legal
action or otherwise), or assist or encourage any other Person to contest or
challenge, the validity of any drugstore.com IPR; provided that the foregoing
shall not preclude Rite Aid from claiming that the IPR in question is Rite Aid
IPR.

     13.4  Accommodation of Patent Application Requirements

     If either Party wishes to file a patent application with respect to
Derivatives or Joint IPR, it shall first notify the other Party and provide a
full disclosure of the intended filing thereto.  Prior to the time such
application is filed, the notified Party shall take no actions that would result
in the loss of the right of the notifying Party to file such patent application,
other than contesting in good faith the notifying Party's ownership of the IPR
represented by such application pursuant to this Agreement.

Section 14.  Resolution of Disputes

     14.1  General

     If any dispute arises between the parties relating to this Agreement or the
Pharmacy Agreement, each party will follow the dispute resolution procedures set
forth in this Section 14 prior to initiating any litigation or pursuing other
available remedies unless otherwise agreed in writing by the parties at the time
the dispute arises.  Notwithstanding the foregoing, any party may commence
litigation without having first complied with the provisions of this Section 14
if such commencement occurs within thirty (30) days prior to the date after
which the commencement of litigation would be barred by any statute of
limitations, statute of repose or other law, rule, regulation, or order of
similar import or in order to request injunctive or other equitable relief
necessary to prevent irreparable harm.  In such event, the parties will (except
as may be prohibited by judicial order) nevertheless continue thereafter to
follow the procedures set forth in this Section 14.

     14.2  Initiation of Procedures

     If a party seeks to initiate the procedures under this Section 14, such
party will give written notice thereof to the other party.  Such notice will (i)
state that it is a notice initiating the procedures under this section, (ii)
describe briefly the nature of the dispute and the initiating party's claim or
position in connection with the dispute, and (iii) identify an individual with
authority to settle the dispute on such party's behalf.  Within ten (10) days
after receipt of any notice under this Section 14.2, the receiving party will
give the initiating party written notice that describes briefly the receiving
<PAGE>

                                                                              24

party's claims and positions in connection with the dispute and identifies an
individual with the authority to settle the dispute on behalf of the receiving
party.

     14.3  Pre-Litigation Discussion

     The parties will cause the individuals identified in their respective
notices under Section 14.2 to promptly make such investigation of the dispute as
such individuals deem appropriate.  Promptly and in no event later than ten (10)
days after the date of the initiating party's notice under Section 14.2, such
individuals will commence discussions concerning resolution of the dispute.  If
the dispute has not been resolved within 30 days after commencement of such
discussions, then any party may request that the other party make its president
available to discuss resolution of such dispute.  Each party will cause its
president to meet together with the other party's president to discuss such
dispute at a mutually agreed upon time within 15 days after a party makes such
request.  If the dispute has not been resolved within 15 days after the
presidents of the parties have first met, then any party may request that the
other party make an independent director available to discuss resolution of such
dispute.  "Independent Director" means any director that is neither an employee
of, nor an outside provider of services to, a party.  Each party will cause its
Independent Director to meet together with the other party's Independent
Director to discuss such dispute at a mutually agreed upon time within ten (10)
days after a party makes such request.  If the Independent Directors do not
resolve the dispute within five (5) days of their first meeting, the parties
shall submit the dispute for non-binding mediation to a mutually agreed upon
mediator or mediation firm.  The parties will use their best efforts to cause
the mediator to resolve the dispute within 15 days of  its submission thereto.
If the mediator is unable to resolve the dispute within such time period, any
party may submit the dispute to litigation.

Section 15.  Breach; Termination; Extension

     15.1  Breach by Rite Aid

           15.1.1  In the event of a material breach by Rite Aid of any of its
material obligations under this Agreement or the Pharmacy Agreement (including
any material breach or inaccuracy of its representations or warranties that has
a material adverse effect on the ability of Rite Aid to perform its obligations
under this Agreement or the Pharmacy Agreement), which breach Rite Aid does not
cure within sixty (60) days after drugstore.com gives Rite Aid written notice
thereof, drugstore.com will have any and all of the following rights:

           (i) the right to terminate this Agreement;

           (ii) the right to seek indemnification pursuant to Section 11;

           (iii) the right to sue for breach; and
<PAGE>

                                                                              25

           (iv) subject to Section 15.3.4, the right to terminate the licenses
granted to Rite Aid in Sections 7.2.2 and 7.3.1.

           15.1.2  All of the foregoing rights are subject to the provisions of
Section 16.6 and 16.7.

     15.2  Breach by drugstore.com

           15.2.1 In the event of a material breach by drugstore.com of any of
its material obligations under this Agreement or the Pharmacy Agreement
(including any material breach or inaccuracy of its representations or
warranties that has a material adverse effect on the ability of drugstore.com to
perform its obligations under this Agreement or the Pharmacy Agreement), which
breach drugstore.com does not cure within sixty (60) days after Rite Aid gives
drugstore.com written notice thereof, Rite Aid shall have any and all of the
following rights:

           (i) the right to terminate this Agreement;

           (ii) the right to seek indemnification pursuant to Section 11;

           (iii) the right to sue for breach; and

           (iv) subject to Section 15.3.4, the right to terminate the licenses
     granted to drugstore.com in Sections 7.2.1 and 7.3.2.

           15.2.2 All of the foregoing rights are subject to the provisions of
Section 16.6 and 16.7.

     15.3  Termination

           15.3.1 This Agreement will terminate upon the earliest of (i) a
termination pursuant to Section 16.14, (ii) expiration of the Term and (iii) a
termination pursuant to Section 15.1 or 15.2. Sections 8, 11 (with respect to
claims, damages or other losses related to or arising from events occurring
prior to termination), 12 (with respect to claims, damages or other losses
related to or arising from events occurring prior to termination), 13, 15 and 16
shall survive any termination of this Agreement except a termination pursuant to
Section 16.14. In addition, no termination (except a termination pursuant to
Section 16.14) of this Agreement shall release a party from liability for
breaches of this Agreement occurring prior to such termination.

           15.3.2 Upon expiration of the Term, all licenses granted pursuant to
Section 7.2 shall continue in perpetuity, provided that: (a) each party shall
continue to provide for one year such technical support as was provided during
the Term pursuant to Section 7.1; (b) Rite Aid shall not use or otherwise
exploit the Rite Aid Technology Derivatives and Derivatives of the Rite Aid
Technology Derivatives, in each case made
<PAGE>

                                                                              26

by drugstore.com, in connection with any business that is operated by, with or
for, or branded by, with or for, a Pharmacy Competitor; and (c) drugstore.com
shall not use (x) the Rite Aid Technology and (y) Derivatives of the Rite Aid
Technology and of Derivatives of Rite Aid Technology Derivatives, in each case
made by Rite Aid, in connection with any business operated by, with or for, or
branded by, with or for, a Pharmacy Competitor.

            15.3.3 Upon termination of this Agreement prior to the end of the
Term because of a material breach by Rite Aid: (a) the license granted to
drugstore.com pursuant to Section 7.2.1 shall terminate one year after the date
of termination in order to provide drugstore.com with a transition period; and
(b) each party shall continue to provide for one year such technical support as
was provided during the Term pursuant to Section 7.1.

            15.3.4 Upon termination of this Agreement prior to the end of the
Term because of a material breach by drugstore.com: (a) the license granted to
Rite Aid pursuant to Section 7.2.2 shall terminate one year after the date of
termination in order to provide Rite Aid with a transition period; and (b) each
party shall continue to provide for one year such technical support as was
provided during the Term pursuant to Section 7.1.

     15.4 Liquidated Damages; Consequential Damages

            15.4.1 In the event drugstore.com terminates this Agreement in
accordance with Section 15.1, Rite Aid will, upon written notice from
drugstore.com, pay to drugstore.com as liquidated damages the sum of $5 million.
Such liquidated damages will constitute the minimum amount payable to
drugstore.com in connection with such termination. This Section 15.4.1 will not
in any way limit drugstore.com's right to seek recovery of any and all damages
actually incurred by drugstore.com and to which it is otherwise entitled under
this Agreement and applicable law. In the event drugstore.com seeks recovery of
additional damages, the sum paid or payable hereunder will be applied to reduce
any amounts payable by Rite Aid to drugstore.com as part of any settlement or
final, unappealable judgment entered in such proceeding.

            15.4.2 In no event will either party have any liability, whether
based in contract, tort (including negligence), warranty or other legal or
equitable grounds, for any loss of interest, profit or revenue by the other
party or for any consequential, indirect, incidental, special, punitive or
exemplary damages suffered by the other party, arising from or related to this
Agreement, even if such party has been advised of the possibility of such losses
or damages.
<PAGE>

                                                                              27

     15.5 Extension

     Unless either party gives the other party written notice not later than one
year and thirty (30) days prior to the expiration of the initial ten year Term
that it does not wish to extend the Term, the Term will automatically be
extended for successive one year periods.  Any additional one year term will
automatically be renewed unless either party gives the other party written
notice to the contrary not later than thirty (30) days prior to the expiration
of the then current term.

Section 16.  Miscellaneous

     16.1 Relationship

     The parties are independent contractors under this Agreement.  Each party
acknowledges and agrees that it is not and will not be during the Term an
employee or an agent of the other party.  Nothing in this Agreement will be
deemed to constitute, create, give effect to or otherwise recognize a joint
venture, partnership, franchise or business entity of any kind.  Nothing in this
Agreement will be construed as providing for the sharing of profits or losses
arising out of the efforts of the parties hereto.

     16.2 Assignment; Sale of Assets or Capital Stock

     This Agreement shall be binding upon and inure to the benefit of the
parties hereto, and the legal representatives, successors in interest and
permitted assigns, respectively, of each such party.  This Agreement shall not
be assigned in whole or in part by any party without the prior written consent
of the other party, such consent not to be unreasonably withheld; provided,
however, that a party may, without consent of the other party, assign this
Agreement to an Affiliate of the assignor, or to an entity acquiring all or
substantially all the assets or capital stock of the assignor due to merger,
acquisition, consolidation or otherwise so long as (a) the assignor remains
liable for the full and faithful performance of its obligations hereunder, (b)
such Affiliate or successor in writing assumes all of the obligations of the
assignor under this Agreement and agrees to comply with the terms set forth in
this Agreement, and (c) a copy of the assignment is provided to the non-
assigning party.  The parties' respective rights and obligations under this
Agreement shall survive any transaction pursuant to which a Third Party acquires
all or substantially all the assets or capital stock of either party, whether
due to merger, acquisition, consolidation or otherwise.

     16.3 Notices

     All notices, requests, demands, applications, services of process, and
other communications that are required to be or may be given under this
Agreement shall be in writing and shall be deemed to have been duly given if
sent by telecopy or facsimile transmission, answer back requested, or delivered
by courier or mailed, certified first
<PAGE>

                                                                              28


class mail, postage prepaid, return receipt requested, to the parties to this
Agreement at the following addresses:

         If to Rite Aid:         Rite Aid Corporation
                                 30 Hunter Lane
                                 Camp Hill, PA 17011
                                 Attn: General Counsel
                                 Fax: 717-760-7867

         If to drugstore.com:    drugstore.com, inc
                                 13920 SE Eastgate Way,
                                 Suite 300
                                 Bellevue, WA 98005
                                 Attn: General Counsel
                                 Fax: 425-372-3800

or to such other address as the party shall have furnished to the other party by
notice given in accordance with this Section 16.3.  Such notice shall be
effective (i) if delivered in person or by courier, upon actual receipt by the
intended recipient, or (ii) if sent by telecopy or facsimile transmission, on
the date of transmission unless transmitted after normal business hours, in
which case on the following date, or (iii) if mailed, upon the date of first
attempted delivery.

     16.4 Waiver

     No provision of this Agreement shall be deemed to be waived and no breach
excused unless such waiver or consent shall be in writing and signed by the
party that is claimed to have waived or consented.  The failure of a party at
any time, or from time to time, to require performance by the other party of any
provision hereof shall in no way affect the rights of such party thereafter to
enforce the same nor shall the waiver by a party of any breach of any provision
hereof by the other party constitute a waiver of any succeeding breach of such
provision, or a waiver of any provision itself, or a waiver of any other
provisions hereof.

     16.5 Severability

     This Agreement will be enforced to the fullest extent permitted by
applicable law.  If for any reason any provision of this Agreement is held to be
invalid or unenforceable to any extent, then: (a) such provision will be
interpreted, construed or reformed to the extent reasonably required to render
the same valid, enforceable and consistent with the original intent underlying
such provision; (b) such provision will be void to the extent it is held to be
invalid or unenforceable; (c) such provision will remain in effect to the extent
that it is not invalid or unenforceable; and (d) such invalidity or
unenforceability will not affect any other provision of this Agreement or any
other agreement between the parties.
<PAGE>

                                                                              29

     16.6 Remedies

     Except as otherwise expressly provided in this Agreement, each and all of
the rights and remedies provided in this Agreement, and each and all of the
remedies allowed at law and in equity, will be cumulative, and the exercise of
one right or remedy will not be exclusive of the right to exercise or resort to
any and all other rights or remedies provided in this Agreement or at law or in
equity.

     16.7 Injunctive Relief

     The parties acknowledge that a material breach of this Agreement would
cause irreparable harm, the extent of which would be difficult to ascertain.
Accordingly, they agree that, in addition to any other legal remedies to which
the non-breaching party may be entitled, such party will be entitled to obtain
immediate injunctive relief in the event of a material breach of this Agreement.

     16.8 Governing Law

     This Agreement will be governed by and construed according to the laws of
the State of Delaware without regard to its choice of law provisions.  The
parties consent to the jurisdiction of such courts and waive any right to assert
that any such court constitutes an inconvenient or improper forum.

     16.9 Publicity

     Neither party shall, without the approval of the other, make any press
release or other public announcement concerning the transactions contemplated by
the Agreements, except as and to the extent that any such party shall be so
obligated by law or by the rules, regulations or policies of any national
securities exchange or association or governmental entity, in which case the
other party shall be advised and the parties shall use their best efforts to
cause a mutually agreeable release or announcement to be issued; provided,
however, that the parties hereby acknowledge and agree that communications among
employees of the parties and their attorneys, representatives and agents
necessary to consummate the transactions contemplated hereby shall not be deemed
a public announcement for purposes of this Section 16.9.  Upon the execution and
delivery of this Agreement, the parties hereto will cooperate in respect of the
immediate issuance of a mutually acceptable press release relating to the
transactions contemplated by the Agreements.
<PAGE>

                                                                              30

     16.10  Entire Agreement

     All Exhibits and Schedules to this Agreement are incorporated in and
constitute a part of this Agreement.  This Agreement and the Pharmacy Agreement,
including the Exhibits and Schedules hereto and thereto, each as amended from
time to time, constitute the entire understanding between the parties in
relation to the subject matter hereof and supersede all prior discussions,
agreements and representations related to this subject matter, whether oral or
written and whether or not executed by a party.  Unless otherwise provided in
this Agreement, no modification, amendment or other change may be made to this
Agreement or any part thereof unless reduced to writing and executed by
authorized representatives of all parties.

     16.11  Counterparts

     This Agreement may be executed in two or more counterparts, each of which
will be deemed an original, but all of which together will constitute one and
the same instrument.

     16.12  Titles and Subtitles

     The titles and subtitles used in this Agreement and in the Exhibits and
Schedules hereto are used for convenience only and are not to be considered in
construing or interpreting this Agreement.

     16.13  Force Majeure

     Neither party shall be responsible for a failure to meet its obligations
under this Agreement to the extent caused by the following:  (i) materially
inaccurate data submitted by the other party; (ii) any failure by the other
party to meet its obligations stated in this Agreement; (iii) any failure of
equipment, facilities or services not controlled or supplied by such party; or
(iv) failure(s) caused by acts of God, acts of nature, riots and other major
civil disturbances, strike by such party's personnel, sabotage, injunctions or
applicable laws or regulations, in each case without breach by such party of any
obligations under this Agreement with regard to either such event or such
failure.  Rite Aid or drugstore.com, as applicable, agrees to use its
commercially reasonable efforts to restore performance of its obligations under
this Agreement as soon as reasonably practicable following any such event.
<PAGE>

                                                                              31

     16.14  Effective Time

     This Agreement shall only become effective (the "Effective Time") upon the
consummation of the purchase by Rite Aid of Series E Preferred Stock of
drugstore.com pursuant to the Series E Preferred Stock Purchase Agreement.  This
Agreement shall automatically terminate upon any termination of the Series E
Preferred Stock Purchase Agreement pursuant to Section 7.16 thereof.  Upon such
termination, this Agreement shall become void and of no further effect.



                            [Signature Page Follows]
<PAGE>

                                                                              32

     In witness whereof, the parties have duly entered into this Main Agreement
as of the date first written above.


Rite Aid:                                drugstore.com:

RITE AID CORPORATION                     DRUGSTORE.COM, INC.



By:  /s/ Elliot S. Gerson                By:  /s/ Peter Neupert
   ------------------------------           ------------------------------
   Name:  Elliot S. Gerson                  Name:  Peter Neupert
   Title: Executive Vice President          Title: Chief Executive Officer

   Address: 30 Hunter Lane                  Address: 13920 SE Eastgate Way
            Camp Hill, PA 17011                      Suite 300
                                                     Bellevue, WA 98005

Source: OneCLE Business Contracts.