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.

The 27-year-old Newtownards woman was third in her heat in a time of 11.57 seconds into a slight head wind.
That was outside her own Irish record of 11.40 and the Rio Olympic Games qualifying standard of 11.32.
Should Foster fail to make the final, Friday's race will be her last chance to attain the Olympic qualifying mark.
Northern Ireland's Olympic Games qualifiers Ciara Mageean and Kerry O'Flaherty will not open their Amsterdam challenges until Friday when Christine McMahon and Ben Reynolds will also be in action.
Other Rio-bound Northern Ireland athletes Paul Pollock, Kevin Seaward and Breege Connolly will run in the half-marathon events on Sunday as part of an Irish squad which will also include North Belfast's Glady Ganiel.
Meanwhile Ireland's Marcus Lawler has qualified for the semi-final of the men's 200 metres.

The Speaker announced the clerks, who advise him on conduct and constitutional issues, would also no longer wear wing collars and white tie.
Conservative Sir Gerald Howarth said the tradition of wearing wigs went back "several centuries".
But Mr Bercow said there was an even older tradition of not wearing wigs.
He announced the changes on Monday, but added that clerks would keep part of their garb - black gowns, to signify they are experts on procedure and constitutional issues.
Mr Bercow said changes to clothing and headgear represented the "overwhelming view" of clerks themselves.
They would "convey to the public a marginally less stuffy and forbidding image of this chamber at work".
But Sir Gerald, MP for Aldershot, raised a point of order, telling the Commons: "I was surprised by [the] statement, which had the sort of appearance of an executive order."
He added that traditional clerks' dress was "key to the dignity of the House" and had been so "for several centuries", adding that MPs "should discuss this".
Mr Bercow replied that it was "a matter that can properly be decided by the Speaker", adding that the House of Commons Commission had approved the changes, which clerks themselves had suggested.
He said that, if one went back more than a "couple of hundred years", the situation was different from that presented by Sir Gerald, and that "several centuries ago", clerks "did not wear wigs".
Mr Bercow has refrained from wearing a wig himself in the Commons since becoming Speaker in 2009, as did his predecessors Michael Martin and Betty Boothroyd.
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.
[NEXT_CONCEPT]
Northern Ireland sprinter Amy Foster has reached Friday's semi-finals of the women's 100m at the European Athletics Championships in Amsterdam.
[NEXT_CONCEPT]
John Bercow has defended the decision that Commons clerks will no longer have to wear wigs, after one MP likened the move to an "executive order".