Fluid PVT is crucial to production of a petroleum reservoir. A complete PVT study requires high quality experimental measurement combined with subsequent efforts in PVT modelling. In contrast with the relatively matured PVT study for conventional reservoirs, PVT study for shale has a number of challenges. It is difficult to get representative fluid samples; and there are various speculations on how porous media can influence fluid PVT. For modeling shale PVT, it is necessary to consider the wall effects of the rock, mainly in terms of capillary pressure and adsorption. This requires robust algorithms as well as adequate procedures to integrate available experimental information into PVT modeling. Previously, we developed equilibrium calculation algorithms with capillary pressure and adsorption and modelled adsorption equilibrium in shale. Here we further integrate them into a PVT tool for PVT simulation, analysis of shale production, and gas injection in shale. The core module in the PVT calculation is flash with capillary pressure and adsorption. A robust flash module forms the basis of PVT simulation. The capillary pressure is described through the Young-Laplace equation. For adsorption, it requires a proper workflow to bridge the limited experimental measurement and the final modeling covering a wider range of hydrocarbons. It is recommended to model the available adsorption data for light gases using a theoretical adsorption model, and then extrapolate the model parameters to heavier hydrocarbons. The generated data from the theoretical model is then fitted to the simplified and more computationally convenient Langmuir model. The flash module can also be integrated into a slimtube simulator to study the porous media effects on gas injection applications. Capillary pressure alone lowers the bubble point pressure and the extent is system dependent. Nevertheless, even for systems with a moderate decrease, the change in the PVT properties in the two-phase region cannot be overlooked. Selective adsorption alters the bulk fluid composition and lowers the heavy components concentration in general. Adsorption is generally more pronounced in the gas region whereas capillary pressure is usually more obvious in the liquid region. Regarding the influence of capillary pressure on gas injection, it can be shown that the recoveries at pressures below the minimum miscibility pressure (MMP) are changed; however, the MMP does not seem to be affected due to the vanishing of capillarity effects. For the gas injection including adsorption, the results show that the recovery decreases if adsorption is considered. This is mainly due to adsorption of heavy components, and desorption of lighter components during the process. The heavy components stay in the adsorbed phase, and will not likely be recovered even at high injection pressures. The present study integrates our previous results on algorithms and modeling into a PVT tool for analyzing shale production. It can be used to infer what the initial fluid composition is in the shale reservoir, and to analyze how capillary pressure and adsorption influence shale production during a depletion procedure. Furthermore, the tool also allows a more advanced analysis for gas injection in shale.