That’s the widget on the top right of my blog. It pre-populates Amazon’s search tool with results based on either your article’s name, or a term you choose if the user is on your blog’s homepage.
You’ll need to get a plugin that allows the execution of php code within text widgets in WordPress, so here’s a quick video telling you how to install Exec PHP, which does the trick nicely:
The widget also relies on server settings that indicate the location of the post/article, and may not work on some systems without a bit of tweaking. Assuming the correct server variables are available, which they are on most systems, you should be able to just cut-and-paste it in.
Here’s the code:
… and here’s a basic idea of how to use it:
Important Note: You must enable custom permalinks for this widget to work correctly, since it relies on the name of the article being in the URL (browser’s location bar) of the page. You may also have to tweak the permalink for each article if the title doesn’t produce any results. Take a look at what I’ve done to this article’s URL to get the idea.