I'm going to divide my answer into two parts. What we should do and what we would do.
What we should do?
Under the undeniable proof that we are not alone in the universe, humanity should come together to use the knowledge for the benefit of all and to accelerate our society onto a path that many believe we are already on. Assuming that this gifted technology followed a path similar to our own, then the extreme advancements in artificial intelligence, structural technologies, and machinery would bring us into an age of over abundance.
Despite the ethical concerns that may arise, including the possibility of what some have termed a "useless" generation of humanity, no man, woman, or child would need to go without food, shelter, and safety. Smart machines would do our jobs and work would turn into hobbies, people would be provided a monthly check just for living; something that has made it to the voting block in Switzerland not that long ago.
The governments would come together like never before, and global organizations would be formed to lead humanity as a whole into this new age of prosperity and wealth.
What we probably would do?
In a significantly more pessimist point of view, the arrival of aliens, no matter if they are peaceful and bearing gifts, will cause widespread panic and terror all across the world. People would loot and cause widespread destruction. Markets will crash, countries would tear themselves apart as their people don't turn up for work, governments would shut down, and a fear will take such a strong hold on humanity that it may take decades to recover.
People that thrive on terror will use the gifted knowledge to make weapons of destruction, those who strongly believe in many religions will find themselves tested in ways that will be unique to each individual, and the countries that survive the initial chaos will draw lines in the sand as each nation starts a massive arming that will make the cold war look like a backwoods gun show.
All things considered, North Korea may well survive the most intact due to its intense control of media and its people, as well as its unbelievable amount of isolation for a world as globally connected as today's world is.
So, in closing, hopefully things will turn out wonderful. But they may not.