
<PAGE>   1
                                                                       EXHIBIT 5



                [LETTERHEAD OF SHAW PITTMAN POTTS & TROWBRIDGE]



                               September 29, 1998



Commercial Net Lease Realty, Inc.
455 South Orange Avenue
Suite 700
Orlando, Florida        32801

         RE:     COMMERCIAL NET LEASE REALTY, INC.

Ladies and Gentlemen:

         We have acted as counsel to Commercial Net Lease Realty, Inc., a
Maryland corporation (the "Company"), in connection with the Registration
Statement on Form S-3 filed by the Company on September 29, 1998, with the
Securities and Exchange Commission under the Securities Act of 1933, as amended
(the "Registration Statement"), relating to the offering by the Company from
time to time of (i) one or more series of debt securities (the "Debt
Securities"), (ii) shares of preferred stock, par value $0.01 per share (the
"Preferred Stock"), (iii) shares of Preferred Stock represented by depositary
shares (the "Depositary Shares"), (iv) shares of common stock, par value $0.01
per share (the "Common Stock"), and (v) warrants to purchase Common Stock (the
"Common Stock Warrants"), with an aggregate initial public offering price of up
to $300,000,000.   The Debt Securities, Preferred Stock, Depositary Shares,
Common Stock and Common Stock Warrants are collectively referred to herein as
the "Offered Securities."

         In our capacity as counsel in connection with such registration, we
are familiar with the proceedings taken and proposed to be taken by the Company
in connection with the authorization and issuance of the Offered Securities,
and for purpose of this opinion have assumed that such proceedings will be
timely completed in the manner currently proposed.  In addition, we have made
such legal and factual examinations and inquiries, including an examination of
originals or copies, certified or otherwise identified to our satisfaction, of
such documents, corporate records and instruments as we have deemed necessary
or appropriate for purposes of this opinion.  Among such documents are the
Registration Statement, the First Amended and Restated Articles of
Incorporation of the Company certified as of a recent date by the State
Department of Assessments and Taxation of Maryland (the "Charter"), the by-laws
of the Company, resolutions adopted by the Board of Directors of the Company
(the "Board of Directors") in connection with
<PAGE>   2
Commercial Net Lease Realty, Inc.
September 29, 1998
Page 2




the matters contemplated by the Registration Statement, and the form of
Indenture (the "Indenture") to be entered into between the Company and a
financial institution organized under the laws of the United States of America
(the "Trustee").

         The Debt Securities will be issued pursuant to the Indenture, the
Depositary Shares will be issued under one or more deposit agreements (each, a
"Deposit Agreement"), and the Common Stock Warrants will be issued under one or
more warrant agreements (each, a "Warrant Agreement"), each to be between the
Company and a financial institution identified therein as depositary or warrant
agent (each, a "Depositary" or "Warrant Agent"), as the case may be.

         Subject to the foregoing and the other matters set forth herein, it is
our opinion, that, as of the date hereof:

         1.      When (i) the Debt Securities have been duly established under
the Indenture (including, without limitation, the adoption by the Board of
Directors of a resolution duly authorizing the issuance and delivery of the
Debt Securities), (ii) the Debt Securities have been duly authenticated by the
Trustee and (iii) the Debt Securities have been duly executed and delivered on
behalf of the Company against payment therefor in accordance with the terms and
provisions of the Indenture and as contemplated by the Registration Statement
and the applicable Prospectus Supplement, the Debt Securities will constitute
legally valid and binding obligations of the Company, enforceable against the
Company in accordance with their terms.

         2.      The Company has the authority, pursuant to its Charter, to
issue up to 15,000,000 shares of Preferred Stock.  Upon adoption by the Board
of Directors of a resolution in form and content as required by applicable law
specifying the designation, rights and preferences of one or more series of
Preferred Stock, filed as required by applicable law, and upon issuance and
delivery of full payment for such shares in the manner contemplated by the
Registration Statement and the applicable Prospectus Supplement and by such
resolution, such shares of Preferred Stock will be validly issued, fully paid
and nonassessable.

         3.      When (i) the final terms of the Depositary Shares and
applicable Deposit Agreement have been duly established in accordance with the
Charter, applicable law and resolutions of the Board of Directors, (ii) the
Board of Directors has adopted a resolution, in form and content as required by
applicable law, duly authorizing the issuance and delivery of the Depositary
Shares and (iii) the Depositary Shares have been duly executed and delivered by
the Company against payment therefor and countersigned by the applicable
Depositary in accordance with the applicable Deposit Agreement and delivered to
and paid for by the purchasers of the Depositary Shares in the manner
contemplated by the Registration Statement, the applicable Prospectus
Supplement and such resolutions of
<PAGE>   3
Commercial Net Lease Realty, Inc.
September 29, 1998
Page 3




the Board of Directors, the Depositary Shares will be validly issued, fully
paid and nonassessable.

         4.      The Company has the authority, pursuant to its Charter, to
issue up to 90,000,000 shares of Common Stock.  Upon adoption by the Board of
Directors of a resolution in form and content as required by applicable law,
and upon issuance and delivery of and full payment for such shares in the
manner contemplated by the Registration Statement and the applicable Prospectus
Supplement and by such resolution, such shares of Common Stock will be validly
issued, fully paid and nonassessable.


         5.      When (i) the final terms of the Common Stock Warrants and
applicable Warrant Agreement have been duly established in accordance with the
Charter, applicable law and resolutions of the Board of Directors, (ii) the
Board of Directors has adopted a resolution, in form and content as required by
applicable law, duly authorizing the issuance and delivery of the Common Stock
Warrants and (iii) the Common Stock Warrants have been duly executed and
delivered by the Company against payment therefor and countersigned by the
applicable Warrant Agent in accordance with the applicable Warrant Agreement
and delivered to and paid for by the purchasers of the Common Stock Warrants in
the manner contemplated by the Registration Statement, the applicable
Prospectus Supplement and such resolutions of the Board of Directors, the
Common Stock Warrants will constitute legally valid and binding obligations of
the Company, enforceable against the Company in accordance with their terms.

         We consent to your filing of this opinion as an exhibit to the
Registration Statement and to the reference to our firm under the caption
"Legal Matters" in the prospectus included therein.

                                        Very truly yours,

                                        /s/ Shaw Pittman Potts & Trowbridge

                                        Shaw Pittman Potts & Trowbridge
