I find shp2img works fine as reported.
I have found that WMS GetMap with a BBOX works fine as reported.
I find that mapserver no longer allows GetMap requests without a BBOX so that error cannot be simply reproduced. I tried disabling the BBOX requirement in mapwms.c and I did reproduce the problem.
It is caused by a call to msAdjustExtent() in msWMSLoadGetMapParams() which modifies the map extent to force square parameters. I am not clear why it is called at this point, and I do not know what to do about it. But it does not seem relavent to make changes since the missing-BBOX case no longer occurs with WMS GetMap.
I also tried to reproduce the problem with php and python scripts unsuccessfully. For instance the following php script produces the expected non-square pixel result:
<?php
//phpinfo();
dl("php_mapscript.so");
$map = ms_newMapObj("test.map");
// print $map->numlayers;
$img = $map->draw();
$img->saveImage("out.png",$map);
?>
At this point I don't think there are any obvious relavent issues with MapServer trunk.