In this paper, a loop-shaping design method of PID controllers is proposed for stable plants under the condition that the plant is linear time invariant and a finite-time plant response is available. The integral gain of the PID controller is maximized subject to a stability margin constraint, and the optimal solution can be found by linear programming. A filter bank is used for extracting useful information from the finite-time response data. Numerical examples show that this method is applicable to a wide range of plants including non-minimum phase and/or time-delay plants.