Iran's Mehr news agency reported that the two leaders met for approximately one hour.
Russia's ITAR-TASS news agency quoted Putin as saying the talks had left him with a "very positive impression."
The Russian president said his Iranian counterpart told him his country was "positively" assessing a package of incentives that EU High Representative for Common Foreign and Security Policy Javier Solana conveyed to Tehran on June 6.
Those proposals were approved by the five permanent members of the UN Security Council -- Britain, China, France, Russia, and the United States -- plus Germany. Their content has not been made public. But they are believed to contain a number of economic and industrial sweeteners, including the possible supply of at least one light-water nuclear reactor to Iran.
Putin said Ahmadinejad assured him that Iran is ready to resume dialog on its controversial nuclear program and will "in the very near future" propose a timetable for the resumption of international talks.
There was no immediate comment from Ahmadinejad or from any member of the Iranian delegation present in Shanghai.
Addressing Ahmadinejad at the start of the talks, Putin had reiterated Russia's position with regard to Iran's nuclear standoff.
"Cultural, political, and security cooperation...will prevent the threats of domineering powers and their illegal and forceful interference."
"We believe that all countries in the world, including Iran, have the right to implement their plans with regard to advanced technologies, and use these technologies for the benefit of their own development," Putin said. "But of course this must be done in a way that the international community feels totally reassured in terms of nonproliferation."
Russia is helping Iran complete the Bushehr nuclear power plant on the Gulf coast and is one of Tehran's leading economic partners. Moscow has been trying to defuse the nuclear standoff that pits the Islamic Republic against Western critics who accuse Iran of trying to develop nuclear weapons.
Iranian President Mahmud Ahmadinejad (left) with his Russian counterpart, Vladimir Putin (epa)
While insisting that Iran has the right to develop its own uranium-enrichment program, Moscow has urged Tehran to cooperate with the International Atomic Energey Agency (IAEA) to eliminate ambiguities over the nature of Iran's nuclear activities.
Putin today reiterated an offer to set up a joint venture that would allow Iran to enrich uranium on Russian soil under international supervision. He said that, if implemented, the project could serve as an example for similar uranium-processing centers to be set up without discriminating against any potential partners.
"We've already discussed the possibility of a Russian proposal to join our forces and set up a joint venture," Putin said. "I believe that we should go further now. We've nearly formulated a new proposal to set up a network of international [uranuim-]enrichment centers, which will grant all countries access to modern technologies and allow them to use them under strict international control -- primarily from the IAEA."
Iran has sent mixed signals over Russia's proposal, first welcoming it, then rejecting it.
President Ahmadinejad did not comment publicly on Putin's fresh offer -- noting only that Tehran and Moscow "share similar positions" on nuclear issues.
Earlier in the day, the Iranian president addressed a gathering of leaders of the Shanghai Cooperation Organization (SCO). He denounced what he called "discrimination and intimidation" in international affairs.
"Cultural, political, and security cooperation -- in addition to strengthening calm and peace in the region -- can have an important role in enhancing peace and stability in the world and make the [SCO] a strong and influential institution in political, economic, and commercial areas on the regional and global level," Ahmadinejad said. "And it will prevent the threats of domineering powers and their illegal and forceful interference."
Ahmadinejad said Iran is ready to host a summit of SCO energy ministers to explore ways to develop joint oil and gas projects.
In what some Western observers believe may have been a concession to China -- which wanted the SCO summit to focus on security and economic issues -- Ahmadinejad made no reference to Iran's international nuclear dispute.
But the issue is likely to top the agenda of the talks he is scheduled to have on June 16 with Chinese President Hu Jintao.