With the exception of bones and Orcus-town, shops are never generated abandoned, and are never restocked under any circumstances - the only way they can gain more items is if they are brought in by you, a dead player from a bones file, or very rarely another monster. Note that this means that there will always be a shop on each of levels 2 and 3 if the conditions are right (which in practice turns out to only be the case about 45% of the time). The creation of a shop assumes there is a suitable room to put them in (i.e., no stairs, only one door) and that there are enough rooms on the level to start with - the minimum number of rooms required is 3 for normal dungeon levels, and 4 for a branch level.
Shops have a base 3/ DL chance of being created on any dungeon level between level 2 and Medusa's Island, with the exception of the Oracle level.