The contract - reportedly worth $10bn (Â£6bn) - was agreed on the sidelines of the World Economic Forum in the Swiss ski resort of Davos.
Ukraine is believed to have some of the largest shale gas reserves in Europe.
New technology means they are more easily recoverable, but opponents warn of a high risk of pollution.
The deal between Ukraine's state company Nadra Yuzivska and Shell was signed by the energy giant's CEO Peter Voser and Ukrainian Energy Minister Eduard Stavytsky on Thursday.
"We have witnessed a great event today. I believe we have become almost relatives," said Ukrainian President Viktor Yanukovych, who was present at the ceremony.
The 50-year production sharing deal is believed to be the biggest contract in Europe to extract natural gas trapped underground in shale rock.
However, experts say that production in Ukraine is several years away and much will depend on results from test wells.
Kiev is hoping that the deal would help it escape dependence on Russian natural gas.
Ukraine "might even go into surplus," Mr Stavytsky said.
Kiev's gas imports from Russia have long been a thorny issue.
In 2006 and 2009,  rows over the gas price led to Russia halting gas supplies to Ukraine during a bitter winter, causing temporary gas shortages in a number of EU countries.
Ukraine has signed a major shale gas deal with Royal Dutch Shell - a move seen as an attempt by Kiev to reduce its dependency on Russian gas imports.