How did trade contribute to the end of shogun rule?

New ideas changed the culture of Japan and created demand to restore the emperor.
In an attempt to control the Japanese economy, the United States overthrew the shogunate.
The samurai were against outside influence, and they led a revolt to remove the shogun.
The Tokugawa shogun declared himself emperor after signing treaties with foreign powers.