Malaysia achieved its biggest trade surplus in three months in June, buoyed by energy exports, but a drop in imports of intermediate goods could mean the country's trade-reliant economy may be starting to feel the pinch from global economic slowing.